WINDSOR, England — As a princess and the heir to Britain’s throne, she visited President Harry S. Truman in Washington and gave him a gift from her ailing father, King George VI. Later, as Queen Elizabeth II, she danced with President Gerald R. Ford and rode on horseback alongside President Ronald Reagan.
Elizabeth, 92, who is now the world’s longest-reigning monarch, has met every president since Truman, except for Lyndon B. Johnson. The latest was President Trump, whom she received at Windsor Castle on Friday.
Mr. Trump, a bull in a diplomatic china shop, had spent the past few days attacking the United States’ closest allies in tweets, referring to himself as a “stable genius” on the world stage and criticizing a fellow head of government on the front page of a British tabloid.
When he sat down for tea, it was with a monarch who is widely acclaimed — even by supporters of a republican form of government — as a force for stability and dignity in a changing world.
The pomp-filled audience with the queen was just one part of a head-spinning sequence of events. It followed a global lash-out tour in which Mr. Trump criticized Britain’s prime minister, Theresa May, and was interrupted by news that the United States special counsel had indicted 12 Russian intelligence officers on charges of interfering in the 2016 election.
For television viewers, it was the kind of whiplash that the president has conditioned them to expect.
But for the queen, it was just another day at work. She has seen it all — the loss of Britain’s empire, the end of colonialism — and met seemingly everyone.
When a Range Rover carrying the president rolled into the castle quadrangle at teatime, the serene and pomp-filled atmosphere seemed worlds away from the protest-roiled streets of London.
Even for a monarch who has encountered her fair share of presidents, Mr. Trump is probably the most disruptive American leader she has met.
But if she had a feeling about his behavior while in England, she didn’t show it. She extended her hand for the president and the first lady, and after a couple of quick handshakes, the trio stood for the playing of “The Star-Spangled Banner.” The queen looked ahead as Mr. Trump and his wife, Melania, clasped their hands over their hearts.
Practiced in the art of ceremony, the queen directed Mr. Trump around the quadrangle as the two participated in an inspection of her honor guard. During a ceremony that lasted about 15 minutes, the president, who at times appeared not to know where exactly to look or walk, shifted his gaze between news cameras and the monarch, who stood before a phalanx of her guards.
Mrs. Trump watched from a nearby dais, and was smiling, stylish and silent in a powder pink Dior suit.
The president and first lady appeared not to have followed long-running protocol in which a bow or curtsy is customary. Moreover, Mr. Trump seemed to walk in front of the queen, and not quite alongside her, prompting Twitter critics to call his motions awkward and even rude.
Stephanie Grisham, the first lady’s communications director, said Mrs. Trump was briefed on royal protocol before the visit, but it was unclear if the president, who eschews briefings, received similar guidance.
In other ways, the Trumps avoided breaching protocol. Touching a royal can make headlines, as Michelle Obama did when she placed her hand on the queen’s back in 2009. Then there was the time, in 1977, when Jimmy Carter kissed the queen’s mother — on the lips, no less.
In all, the Trumps’ encounter lasted nearly an hour. It was the last stop in Mr. Trump’s two-day working visit to England. After meeting the queen, Mr. Trump flew to Scotland, where his mother was born and where he owns two golf courses, for the weekend.
The royal communications office said on Friday that it would not release details on the time the Trumps shared with the queen, and the White House did not immediately respond to a request for comment about their encounter.
Thirteen prime ministers of Britain have served the queen, starting with Winston Churchill, whom Mr. Trump has long admired. Whether Churchill came up during the teatime conversation was not disclosed.