As dignitaries and world leaders milled around Buckingham Palace on Tuesday at a NATO summit reception, Canadian Prime Minister Justin Trudeau, British Prime Minister Boris Johnson and French President Emmanuel Macron chatted in a loose circle.

Snippets of their conversation rose above the din and were captured in a short video that went viral after viewers surmised that the group appeared to be joking about President Trump’s performance earlier in the day.

“Is that why you were late?” a smiling Johnson asks Macron in the 25-second clip first shared by the Canadian Broadcasting Corp.

“He was late because he takes a 40-minute press conference off the top,” Trudeau chimes in.

Trump did not take kindly to the comments. While answering questions at NATO Wednesday, he responded to the video by lobbing an insult — buffered by a compliment — at Trudeau.

“Well, he’s two-faced,” Trump said of the Canadian leader. “Honestly with Trudeau, he’s a nice guy. I find him to be a very nice guy. But the truth is that I called him out on the fact that he’s not paying two percent and I guess he’s not very happy about it.”

“It’s Canada, they have money, and they should be paying two percent, so I called him out on that and I’m sure he wasn’t happy about that but that’s the way it is," Trump said in his retort Wednesday. "Look, I’m representing the U.S. and he should be paying more than he’s paying and he understands that. So I can imagine he’s not that happy, but that’s the way it is.”

At the Tuesday evening reception hosted by Queen Elizabeth II inside the palace’s Green Drawing Room, none of the three leaders — who appeared unaware they were on camera — mentioned Trump by name in the video.

After Trudeau’s comments, Macron can be seen replying inaudibly and gesturing.

“You just watched his team’s jaws drop to the floor,” an animated Trudeau later tells the group.

When Trudeau was asked about the viral moment at a press conference Wednesday, he avoided directly commenting on whether he mocked Trump but said that he “made a reference to the fact that there was an unscheduled press conference” before his meeting with the president.

Hours before Tuesday’s reception, Trump had turned what were “expected to be brief photo opportunities” with NATO Secretary General Jens Stoltenberg, Macron and Trudeau into “his own personal daytime cable show,” The Washington Post reported. During the one-on-one meetings, Trump clashed with Macron and needled Trudeau over Canada’s NATO spending.

“Trump pronounced, prodded and pushed America’s allies into a state of unbalance — seizing the global stage to both bully and banter, all while keeping himself at the center of attention,” The Post’s Ashley Parker, Philip Rucker and Michael Birnbaum wrote, noting that the three impromptu news conferences ended up spanning two hours.

At his press conference, Trudeau said his comment about dropping jaws was in reference to Trump’s surprise announcement during his bilateral meeting with the Canadian Prime Minister that the next G7 meeting would be at Camp David. Trudeau said the video captured him telling Johnson and Macron about the “unscheduled announcement.”

Every leader’s teams have moments that make their jaws drop, Trudeau said at the press conference.

On Wednesday, Johnson said he was not joking about Trump. “That’s complete nonsense,” Johnson said. “I don’t know where that’s come from.” Macron offered a similarly defensive response. “Normally I don’t comment on stolen video recordings,” the French leader said. “I’m not going to get into that game because it leads nowhere.”

The video was not stolen, but reportedly came from a CBC journalist who caught the moment on a TV pool feed.

Suggestions that Trump’s behavior was the subject of the leaders’ conversation sparked pointed commentary and derision on social media.

For decades, Trump has publicly expressed concern that the United States is a “laughing stock,” as he tweeted in 2015. The Post found in 2016 that Trump had stated some variation of the criticism at least 103 times going back as early as 1987. During his presidential campaign, Trump repeatedly vowed to change that perception if elected.

Then, as Trump addressed the U.N. General Assembly last year, he was visibly caught off guard when his remarks were met with an unexpected response — laughter.

Trump had just boasted “that his administration had accomplished more over two years than ‘almost any administration’ in American history, eliciting audible guffaws” from members of the audience, which included a number of world leaders, The Post’s David Nakamura reported at the time.

“Didn’t expect that reaction,” Trump said, drawing more chuckles, “but that’s okay.”

Later, the president reportedly insisted that his statement “was meant to get some laughter,” adding, “It was great.”

Before Trump took aim at Trudeau over the video, he tweeted early Wednesday that he “enjoyed” his post-reception meeting with Johnson at 10 Downing Street, where the pair “talked about numerous subjects including @NATO and Trade.”

When Trudeau arrived at the summit early Wednesday, he walked briskly by reporters and did not answer shouted questions regarding his remarks allegedly about Trump. Later, as leaders sat down for their meeting, Trudeau could be seen going over to Trump and shaking his hand politely. The two men said something quickly to each other, then Trudeau walked away.

At the Wednesday press conference later in the day, Trudeau was asked if his hand shake with Trump was accompanied by an apology, but the prime minister did not directly respond. Trudeau addressed concern that he had jeopardized Canada’s standing with the U.S. by saying the relationship between the two nations is “an extraordinarily important and effective one.”

Meanwhile, social media has been was flooded with reactions.

Some viewers were shocked to witness the leaders seeming to act like “mean girls,” as one person put it.

“Oh my God,” a Twitter user wrote. “This is quite something,” another person opined.

Others quickly noticed that a member of the royal family was also involved in the exchange, identifying Princess Anne, the daughter of Queen Elizabeth II, by her distinctive hair. A photograph taken at the reception showed the princess talking to Trudeau and Johnson. Earlier in the evening, Anne was seen in another viral video appearing to shrug off a “scolding” from the queen for not joining the royal receiving line to greet the president and first lady.

Several people warned that Trump would probably retaliate if he saw the leaders appearing to laugh at his expense.

“Trump is watching this somewhere and drafting orders to invade Canada,” tweeted Robyn Urback, a Globe and Mail columnist. “These last 150ish years have been fun, friends.”

“Oh, man, Trump’s going to start World War III over this,” wrote Chicago Tribune humor columnist Rex Huppke.

Still, not everyone perceived the video as a negative reflection of Trump or the United States.

“This is great news for Trump,” Fox News host Laura Ingraham tweeted. “Foreign leaders have been laughing at Republican presidents since Reagan.”

But for “The Daily Show With Trevor Noah,” the gaggle of dignitaries commiserating about Trump was reminiscent of another experience.

Michael Birnbaum and William Booth in London contributed to this report.