US President Donald Trump has been welcomed by the Queen to Windsor Castle as the official part of his whirlwind visit to the UK drew to a close.

The Queen greeted the US leader and First Lady Melania Trump in the quadrangle of the royal residence – a home to kings and queens for centuries.

Waiting to be inspected by Mr Trump was a guard of honour, formed by one of the Army’s longest serving units, the 1st Battalion Coldstream Guards, in their red tunics and bearskins.

Donald Trump
Donald Trump and the Queen inspected a Guard of Honour (Matt Dunham/PA)

Ahead of the meeting between the heads of state,  Mr Trump spoke of his admiration for the Queen in his interview with the Sun, in which he called her a “tremendous woman”.

He told the paper: “If you think of it, for so many years she has represented her country, she has really never made a mistake.

“You don’t see, like, anything embarrassing. She is just an incredible woman.

“My wife is a tremendous fan of hers. She has got a great and beautiful grace about her.”

During the Queen’s 66-year reign there have been 13 American presidents, from Harry S. Truman to Mr Trump, and she has now met all of them except one, Lyndon B. Johnson.

President Obama at Windsor
Barack Obama and his wife Michelle are greeted by the Queen and the Duke of Edinburgh in 2016 (Alastair Grant/PA)

Later, Mr and Mrs Trump will take tea with the Queen in the castle’s Oak Room, where in 2016 she hosted tea for the then US president Barack Obama and his wife Michelle.

The Queen and George W Bush
The Queen showing George W Bush the ceiling of St George’s Hall, Windsor Castle (Nick Ray/The Times/PA)

In 2008, when then US president George W. Bush had tea with the Queen at Windsor, he enjoyed a traditional English afternoon spread of tea, small sandwiches and cakes in the White Drawing Room.

The Band of the Coldstream Guards and the Band of the Grenadier Guards played the US national anthem when Mr Trump and his wife first arrived, and the guard of honour gave a royal salute.

The day after the 9/11 terrorist attacks, the Band of the Coldstream Guards played the Star-Spangled Banner on the forecourt of Buckingham Palace as a mark of respect.

Special permission was granted by the Queen for America’s national anthem to be played during the changing of the guard ceremony, in a display of solidarity and in tribute to the many who died.

It was the role of the Duke of Edinburgh to escort the visiting head of state when they inspected the guard of honour.

But with Philip now retired, the Queen accompanied Mr Trump on to the manicured lawns of the quadrangle where the 1st Battalion Coldstream Guards were waiting.

Mr Trump was guided along by the Queen at the start of his inspection of the guard of honour, and when in position he walked along at a sedate pace looking at the soldiers.

Donald Trump and the Queen inspect a Guard of Honour at Windsor Castle
Donald Trump and the Queen inspect a guard of honour at Windsor Castle (Matt Dunham/PA)

The president and the Queen walked along, with Major Ollie Biggs, in command of the guardsmen, following a few steps behind.

As the two heads of state made their way back to the dais, they appeared deep in conversation and could be heard talking as the military band stopped playing briefly.

The pomp and ceremony continued when the guard of honour formed from the 1st Battalion Coldstream Guards marched off.

Mr Trump and the Queen paused at the entrance of the castle’s Sovereign Gate, where a small senior group of the Queen’s household were waiting.

First in line was her lady-in-waiting Virginia Ogilvy, Countess of Airlie, and when the Queen introduced her to the president, the monarch told him she was American.

The countess was born in New Jersey and married the Earl of Airlie, who was a merchant banker but later in life also served as the Lord Chamberlain.