The Queen and the Duke of Edinburgh have formally welcomed the King of Spain to the UK with a military spectacle full of pomp and pageantry.

Britain’s head of state and Philip warmly shook hands with King Felipe VI and his wife, Queen Letizia, at Horse Guards Parade, Henry VIII’s former jousting yard.

The Duke, Queen and king are all descended from Queen Victoria and they shared a few words before the welcome ceremony began.

The Queen meets King Felipe VI of Spain (Nick Ansell/PA)The Queen had her hand kissed by the King Felipe VI of Spain (Nick Ansell/PA)

The Queen welcomed <a href=Theresa May and other dignitaries (Nick Ansell/PA)">The Queen welcomed Theresa May and other dignitaries (Nick Ansell/PA)

Members of the Household Cavalry rode ahead of the state carriage procession (MoD/PA)Members of the Household Cavalry rode ahead of the state carriage procession (MoD/PA)

It is the first state visit by a Spanish monarch since King Juan Carlos toured Britain in 1986 when he raised the controversial issue of Gibraltar – as his son Felipe is expected to do when he addresses parliamentarians later.

The Prince of Wales and the Duchess of Cornwall had escorted the king and his wife from their London hotel to Horse Guards Parade, arriving in chauffeur-driven limousines.

Hannah McKay/PAThe Duchess of Cornwall and Spain’s Queen Letizia travelled together (Hannah McKay/PA)

The Prince of Wales and the Duchess of Cornwall spent time with the Spanish royals at their hotel (Hannah McKay/PA)The Prince of Wales and the Duchess of Cornwall spent time with the Spanish royals at their hotel (Hannah McKay/PA)

Following protocol the Queen introduced the Spanish couple to leading figures from UK national life, including Prime Minister Theresa May, Home Secretary Amber Rudd – whose hat blew off when she arrived – Metropolitan Police Commissioner Cressida Dick and senior military figures.

During their three-day visit Felipe and Letizia will dine at a Buckingham Palace state banquet, with Prince Harry and the Duke and Duchess of Cambridge expected to attend; visit the Palace of Westminster, where the king will address parliamentarians; and on Thursday Felipe will meet Mrs May at Downing Street.

The backdrop to the visit is strained relations between Spain and the UK over the sovereignty of Gibraltar, which have come to the fore because of Brexit.

The Duke of Edinburgh and Queen Letizia of Spain rode together in a carriage to Buckingham Palace (MoD/PA)The Duke of Edinburgh and Queen Letizia of Spain rode together in a carriage to Buckingham Palace (MoD/PA)

At the palace, the four royals posed for pictures (Yui Mok/PA)At the palace, the four royals posed for pictures (Yui Mok/PA)

Simon Manley, Britain’s ambassador to Spain, was questioned by journalists in Madrid last week, and when asked if Felipe could talk about the British overseas territory in his Westminster speech, he replied it was a possibility.

Last September, Felipe used his address to the UN General Assembly in New York to call for a negotiated handover of The Rock.

The king, at 6ft 5in, towered over the Queen, and he kissed his relative on the cheek and hand when they met.

A guard of honour, the 1st Battalion Irish Guards, lined up in front of the royal party and Philip escorted Felipe across the parade ground to inspect the troops.

The king strode ahead of his host with Philip having to pick up his pace to keep up.

Back on a dais, the Queen chatted to Letizia as they watched the men walk along the line of guardsmen.