A furious Donald Trump cut short his attendance at the Nato summit in London after a group of leaders, including Boris Johnson, was caught on video ridiculing the US president at Buckingham Palace for staging lengthy press conferences.

The notoriously thin-skinned Trump cancelled a planned press conference and branded the Canadian prime minister, Justin Trudeau, “two-faced” after he was revealed on video leading the laughter at Trump’s expense together with other US allies.

Trump said the Canadian leader was probably angry because he called him out over Canada’s failure to meet the Nato target of spending 2% of its GDP on defence, a figure that has developed a shibboleth status in the president’s eyes and underlines his transactional approach to the western defence alliance.

Footage emerged late on Tuesday that appears to show world leaders joking about Trump at the summit, which has been marked by sharp disagreements over spending and future threats, including Turkey’s role in the alliance and China, as well as a clash of personalities that triggered a flurry of incendiary language being deployed by leaders.

The video shows leaders including Trudeau, Johnson, the French president, Emmanuel Macron, the Dutch prime minister, Mark Rutte, and Princess Anne at the Buckingham Palace event on Tuesday evening.

In audio caught on a nearby microphone, Johnson asks Macron: “Is that why he was late?” before Trudeau interjects: “He was late because he takes a 40-minute press conference off the top.”

Trudeau adds: “Oh, yeah, yeah yeah. He announced … ” before he is cut off by Macron, who speaks animatedly to the group. Macron’s back is to the camera and his words are inaudible.

After an edited cut in the film, the footage later shows an incredulous Trudeau telling the group: “You just watched his team’s jaws drop to the floor.”

How does Nato look at the age of 70? It's complicated Read more

The US president was sitting alongside the German chancellor, Angela Merkel, on Wednesday when a reporter asked about Trudeau’s apparent remarks.

“Well, he’s two-faced,” Trump said of Trudeau, before going on to make a reference to the defence spending of Nato allies who commit less than the agreed 2% to defence.

“I find him to be a very nice guy but you know the truth is that I called him out the fact that he’s not paying 2% and I can see he’s not very happy about it. He’s not paying 2% and he should be paying 2%. Canada – they have money.”

Play Video 0:42 Donald Trump says Justin Trudeau is 'two-faced' – video

Apparently aware of how his actions would be interpreted, Trump was then himself caught on a hot mic saying: “Oh, and then you know what they’ll say. He didn’t do a press conference. He didn’t do a press conference. That was funny when I said the guy’s two-faced, you know that.”

The US president later tweeted: “When today’s meetings are over, I will be heading back to Washington … We won’t be doing a press conference at the close of Nato because we did so many over the past two days. Safe travels to all!”

On Wednesday evening he tweeted: “The Fake News Media is doing everything possible to belittle my VERY successful trip to London for NATO. I got along great with the NATO leaders, even getting them to pay $130 Billion a year more, & $400 Billion a year more in 3 years. No increase for U.S., only deep respect!”

Overall the episode is only likely to underline the sense that the supposed leader of the free world is privately viewed with a mixture of mirth and alarm.

Asked at his own press conference about the video footage, Johnson shook his head and said: “That’s complete nonsense. I don’t know where that’s come from.”

Pressed again, he said: “I really don’t know what’s being referred to there.” Johnson’s aides would not say whether he had seen the video, but claimed he had been “very busy” at the summit.

Privately Downing Street will be relieved that the unpredictable Trump did not face the international media again, fearing that under questioning he might rescind his commitment not to include the NHS in any future trade talks or repeat his criticisms of the terms of Johnson’s Brexit deal.

With Trump seen as electorally toxic in the UK in the final days of the election campaign, it is notable that few public images of the two men together have been released, despite the pair attending events at both Buckingham Palace and No 10 on Wednesday, as well as having their own bilateral meeting.

Johnson also sidestepped the opportunity to praise Trump personally when asked if he thought the president’s leadership was good for the west and for Britain, replying by praising the US as a nation.

Trudeau also tried to play down the laughter at the president’s expense. He said: “We had a great meeting yesterday between me and the president … Last night I made a reference to the fact there was an unscheduled press conference before my meeting with President Trump, I was happy to take part in it but it was certainly notable,” Trudeau said.

Trump had startled his aides on Monday by holding two lengthy impromptu freewheeling press conferences, one with the Nato secretary general, Jens Stoltenberg, and another with President Macron. At the first he launched a tirade against Macron, calling the French president’s remarks that Nato was “brain dead” as “very, very nasty” and “insulting”.

Play Video Princess Anne, Johnson, Trudeau and Macron appear to joke about Trump at Nato summit – video

At the second event, he was personally polite to Macron but clashed with him over France’s refusal to take back its foreign fighters from Syria, and then threatened trade sanctions against countries that did not reach the Nato defence target, so putting Germany in his sights.

Ironically until his abrupt walkout, Trump had shown a new relative warmth to Nato, claiming credit for the recent rise in European defence spending and praising the institution in the face of Macron’s criticisms. He even said: “There’s a great spirit. A lot of people are putting up a lot of money.”

The comments had marked a change of tone from sentiments he voiced at the outset of his presidency, when he dismissed the alliance as obsolescent and questioned the value of article 5, the collective defence clause that requires Nato members to come to each other’s military aid if under attack.

It is not the first time Trump has had a run-in with Trudeau. Last year he withdrew US support for a G7 declaration prepared for a summit in Charlevoix, Quebec. Trudeau’s hard work in preparing the communique unravelled after Trump, who left early, tweeted from Air Force One that Trudeau was “very dishonest and weak” following criticism from the prime minister of US steel and aluminium tariffs. As a result France at this year’s G7 tried to pare the communique down to a minimum.

Trump is due to chair the next G7 at Camp David next year. He had originally scheduled to hold the high security event at his Doral Miami resort in Florida, but agreed to shift the venue in wake of criticism that it was inappropriate to use his own property for such a purpose.