LONDON — President Donald Trump barreled out of the NATO gathering here ever more the global outsider, passing up a high-profile presidential moment as impeachment bore down on him back home.

Wednesday, the final day of the meeting, began with a video from the previous evening that shook the NATO gathering. In the clip, French President Emanuel Macron, Canadian Prime Minister Justin Trudeau and British Prime Minister Boris Johnson appeared to be mocking Trump — commiserating about having to sit by his side as he took reporters' questions for extended unplanned sessions — in a conversation caught on a hot mic at a reception at Buckingham Palace.

And so a remarkable two days that featured name calling and mutual snubs, along with headline-grabbing public slights from other world leaders, culminated in Trump's decision to scrap a planned presidential press conference as reporters waited inside the room where it was to be held.

One White House official called the remarks on the video “juvenile, jealous and elitist,” adding that the leaders should “be like the rest of the spineless detractors and get a Twitter account.” Johnson allies said they were relieved his comments couldn’t be heard.

The video led to Trump calling Trudeau “two-faced,” a comment he later appeared to compliment himself for (“That was funny when I said that guy was two-faced," reporters overheard him saying during a meeting with a group of world leaders Wednesday afternoon).

Meanwhile, the president himself used his closing moments here to bemoan the impeachment hearing taking place before the House Judiciary Committee back in Washington as he spoke.

"To do it on a day like this, where we’re in England and some of the most powerful countries in the world having very important NATO meetings, and it just happened to be scheduled on this day. It’s really, honestly, it's a disgrace," Trump said, referring to House Intelligence Committee Chairman Adam Schiff, D-Calif., as a "stone cold loser."

The public start to this week’s NATO gathering foreshadowed its end. In his first public remarks in London on Tuesday, Trump called comments by France’s Macron “very, very nasty” and accused him of insulting NATO.

When Trump met with Macron hours later, the French leader appeared at times to be lecturing Trump before reporters, sitting on the edge of his chair, almost lunging toward his U.S. counterpart.

Trump mockingly offered Macron ISIS prisoners: “Would you like some nice ISIS fighters? I could give them to you.” Macron did not respond in kind.

"Let's be serious," he said, urging Trump to focus on the larger issue. "It is true you have foreign fighters coming from Europe, but this is a tiny minority of the overall problem,” he said — a remark Trump called "one of the greatest non-answers I have ever heard.”

It was a stark contrast to the tone when the pair met over the summer in Biarritz, France, when they went out of their way to compliment each other, and Macron seemed to make an extra effort to make Trump feel welcome — and a sharp departure from the start of Trump’s presidency, when the two seemed so close they were described has having a “bromance.”

Trump showed rare discipline when it came to Johnson, a leader he considers a friend and who is facing re-election next week with an electorate that deeply disapproves of the U.S. president. Trump dutifully refrained from weighing in on the British election.

Johnson carefully managed the president by meeting privately with him Tuesday night at 10 Downing Street, but ensuring there were no photographs of the two of them, according to a British official. Another person close to Johnson said that had met the goal of getting the U.S. president in and out of London without any incident that might affect the campaign — a success the hot mic video threatened to overshadow.

Asked whether he and other leaders were making fun of Trump, Johnson himself told a news briefing later Wednesday that that interpretation was "absolute nonsense, and I don't know where that's come from.”

But as the implied mockery of Trump in the video dominated headlines Wednesday, the president canceled a long-planned news conference scheduled for later that day.

“We will go directly back. I think we have done plenty of press conferences unless you’re demanding a press conference, but I think we’ve answered plenty of questions,” Trump told reporters during a photo opportunity with German Chancellor Angela Merkel.

Trump had spent about two hours on Tuesday taking questions from the press pool at sit-downs with other world leaders.

The president’s remark about the news conference set off mass confusion for the next hour among White House staff; it wasn’t until Trump tweeted an hour later that he had formally scrapped the event that dozens of reporters seated in the room where it was to be held, as well as the staff members who were sent to the site, knew for certain that it would not take place.

As Trump was preparing to leave, other leaders, including Macron and Trudeau, held their own news conferences.

Trump's move meant passing up an opportunity for a dramatic example of the counterprogramming strategy his team has embraced — for him to grab the presidential spotlight on the world stage just as a new round of the impeachment hearings engulfing his presidency took place on Capitol Hill on Wednesday.

It rounded off two days of missed opportunities that included stepping on a chance to claim credit for pressuring NATO allies to increase their defense spending by openly sparring with Macron over the future of the alliance, and rattling the financial markets by off-handedly throwing in doubt reaching a trade deal with China before the 2020 election.

Trump rarely exits a meeting of world leaders without controversy. But given the sheer volume of public sniping, private swipes and messaging stumbles, this gathering — at a particularly pivotal moment in his presidency — stood out.