Mr. Trump made the announcement on Twitte r after calling Prime Minister Justin Trudeau of Canada “two-faced” while speaking to reporters ahead of a meeting with Chancellor Angela Merkel of Germany. Earlier, a brief video had surfaced that showed a small group of NATO leaders at Buckingham Palace reception expressing dismay about Mr. Trump’s behavior.

“Honestly, with Trudeau, he’s a very nice guy,” Mr. Trump said when asked about the Canadian leader, in comments that were among the starkest to date of how the relationship between the two North American neighbors has weakened since Mr. Trump took office.

“The truth is, I called him out on the fact that he’s not paying 2 percent and he’s not very happy about it,” said Mr. Trump, who spoke to reporters at length twice on Tuesday, referring to Canada’s financial contributions to NATO. The president tried to make light of his remarks in a comment caught as reporters were being ushered from the room.

“That was funny when I said that guy was two-faced,” he said, referring to Mr. Trudeau.

The video was posted overnight, and in it Mr. Trudeau is heard commiserating with President Emmanuel Macron of France and Prime Minister Boris Johnson of Britain about Mr. Trump’s conduct on the first day of the two-day NATO gathering. Princess Anne, the daughter of Queen Elizabeth II, and Prime Minister Mark Rutte of the Netherlands are also standing with the group.