President Trump and first lady Melania Trump joined Queen Elizabeth for tea Friday in a first-ever meeting that kicked off with formal British pomp and circumstance at Buckingham Palace.

The Trumps took turns politely shaking hands with her majesty — who was wearing a periwinkle blue hat and matching jacket over a floral-print dress — after arriving at Windsor Castle promptly at 5 p.m. UK time.

They flanked the queen in the quadrangle of the castle and held their hands over their hearts as her guards played “The Star-Spangled Banner.”

Afterward, the president and the queen then slowly made their rounds past the orderly lines of soldiers — with Trump at one point abruptly stopping to study them, forcing the 92-year-old monarch to walk around him.

The pair were seen exchanging chit-chat as the band played on.

The queen has met with 11 of 12 US presidents during her reign — the only one she didn’t encounter was President Lyndon Johnson.

Their tea date was expected to last about 40 minutes before the Trumps depart from London and head to Scotland, where they’ll stay at Trump Turnberry ahead of the president’s meeting Monday with Russian leader Vladimir Putin.

The royal communications office said it would not be releasing details of the 48-minute sit-down.