WASHINGTON — President Trump escalated a bitter clash with some of America’s closest allies on Sunday, lashing out through his advisers at Canada’s prime minister in unusually personal terms and leaving himself with a diplomatic crisis as he arrived in Asia to negotiate a nuclear agreement with North Korea.
A day after Mr. Trump refused to sign a communiqué of the Group of 7 major industrial economies, he and his advisers went on the attack, accusing Prime Minister Justin Trudeau of “betrayal” and a “stab” in the back, even as Canada, Germany and France pushed back against what they called the American president’s “insult” and “inconsistency.”
The exchange left Mr. Trump estranged from America’s partners at the very moment he is about to stride onto the most important world stage he has assumed since taking office. Aides attributed his outburst over the weekend to his feeling undercut as he prepared to meet with the North Korean leader, Kim Jong-un, while critics said he had stiff-armed his friends at the expense of a unified front.
Whether Mr. Kim sees Mr. Trump’s combative approach as a sign of strength or weakness, the rupture with other major powers was sure to shadow the session between the two in Singapore on Tuesday, the first time leaders of the United States and North Korea will have met in person. Mr. Trump’s strategy for pressuring Mr. Kim to give up his nuclear weapons has depended on isolating North Korea, but he arrived in Singapore looking isolated himself.
“I’ve never seen anything like this,” said Robert D. Hormats, who advised Republican and Democratic presidents at a dozen Group of 7 summit meetings, starting at the first in Rambouillet, France, in 1975, when it was still the Group of 6.
“The irony is this institution that was designed largely by the United States was really designed to shore up alliances and political relationships and resolve economic issues. This just served to do the opposite of that.”
The latest meeting, held in Canada, was tense amid disputes over trade, security and other issues. But after negotiators for all seven countries crafted a final communiqué that even the reluctant American delegation agreed to, Mr. Trump abruptly lashed out on Twitter from Air Force One on Saturday night.
He refused to sign the communiqué, blaming Mr. Trudeau for making “false statements” at an end-of-summit news conference, and called the Canadian leader “dishonest & weak.”
By Sunday morning, Mr. Trump’s aides were adding fire to the attack on Mr. Trudeau. Larry Kudlow, the president’s economic adviser, said Mr. Trudeau’s comments were “a betrayal” and that he had “stabbed us in the back.” Mr. Trump “is not going to let a Canadian prime minister push him around,” Mr. Kudlow said on CNN’s “State of the Union” program, adding, “He is not going to permit any show of weakness on the trip to negotiate with North Korea.”
Peter Navarro, the president’s trade adviser, was even harsher. “There’s a special place in hell for any foreign leader that engages in bad-faith diplomacy with President Donald J. Trump and then tries to stab him in the back on the way out the door,” Mr. Navarro said on “Fox News Sunday.”
Mr. Trump finally weighed in again on Sunday night with a cascade of fresh tweets targeting Canada, Germany and the European Union, accusing them of unfair trade practices and of not spending enough on their security. He cited a series of selective statistics about Canadian-American trade, adding derisively, “Then Justin acts hurt when called out!”
Left unclear was what exactly Mr. Trudeau had said that so offended Mr. Trump. During his Saturday news conference, the prime minister was relatively measured but repeated his position that Canada “will not be pushed around” and would respond to American tariffs with tariffs of its own.
Mr. Trudeau on Sunday publicly ignored the dispute, instead hailing “the historic and important agreement” that “will help make our economies stronger & people more prosperous,” as he wrote on Twitter.
But his foreign minister, Chrystia Freeland, told reporters that if anyone should be insulted, it was Canada, because Mr. Trump had cited a national security justification for his tariffs on steel and aluminum. “The national security pretext is absurd and frankly insulting to Canadians, the closest and strongest ally the United States has had,” she said. “That is where the insult lies.”
As for the comments by Mr. Trump’s aides, she said, “Canada does not believe that ad hominem attacks are a particularly appropriate or useful way to conduct our relations with other countries.”
Roland Paris, a former foreign affairs adviser to Mr. Trudeau, went further. “Big tough guy once he’s back on his airplane,” he wrote on Twitter. “Can’t do it in person, and knows it, which makes him feel week. So he projects these feelings onto Trudeau and then lashes out at him. You don’t need to be Freud. He’s a pathetic little man-child."
Other members of the Group of 7 stood with Canada against Mr. Trump.
“International cooperation can’t depend on anger and small words,” France’s Élysée Palace said in a statement. “Let’s be serious and worthy of our people. We spent two days obtaining a draft and commitments. We stick to it. And anyone who leaves and turns their back on them shows their inconsistency.”
Prime Minister Theresa May of Britain issued a statement through an aide saying she was “fully supportive of Justin Trudeau.” The German foreign minister, Heiko Maas, on Sunday called on European nations to stick together following Mr. Trump’s announcement.
“It’s actually not a real surprise,” Mr. Maas told reporters in Berlin. “We have seen this with the climate agreement or the Iran deal. In a matter of seconds, you can destroy trust with 280 Twitter characters. To build that up again will take much longer.”
Mr. Trump never really wanted to attend the Group of 7 meeting, but aides pressed him to go even as they feared it would be a disaster because he was being forced to do something he did not want to do. He rebelled by showing up late and leaving early.
During closed-door meetings, Mr. Trump largely listened through most issues, firmly crossing his arms and swiveling a bit in his seat, according to people who were in the room. At points, he looked around trying to catch the eyes of others, as if looking for reassurance, the witnesses said. Some smiled back; others did not.
He arrived 18 minutes late for a Saturday session on gender equality and did not bother putting his headphones on for translation when President Emmanuel Macron of France spoke. At some points, Mr. Trump closed his eyes in what people in the room took to mean he was dozing off.
But he came alive whenever trade was mentioned, mocking and insulting other leaders, particularly Mr. Trudeau, Mr. Macron and Chancellor Angela Merkel of Germany, according to the witnesses. Ms. Merkel was clearly not happy but largely kept quiet, evidently not wanting to provoke more conflict. Mr. Trump’s conversation was described by European officials as stream of consciousness, filled with superlatives but not following a linear argument.
Negotiators worked late Friday night to craft a statement that all seven leaders could sign. Mr. Trump’s delegation objected to the term “rules-based international order” until negotiators compromised by expressing support for “a” rules-based order rather than “the” rules-based order.
In a section on trade, the Americans insisted on using the word “reciprocal,” one of Mr. Trump’s favorite terms. They compromised by expressing support for “creating reciprocal benefits.” They did not refer directly to the Iran nuclear agreement, which Mr. Trump just pulled out of, but the Europeans included a reference to the United Nations Security Council resolution that endorsed the deal.
The negotiators included agree-to-disagree language on climate change and on an international commitment to reduce plastics in the world. And then the statement was released on Saturday night, only to have Mr. Trump disavow it. Mrs. May learned only as her helicopter arrived at the airport for her to board her plane to return to London.
“It started out as a good summit because we were actually talking to each other, instead of past each other,” said Peter Beyer, the German government’s coordinator on trans-Atlantic relations. But he added, “It looks like the U.S. is no longer a reliable partner in international agreements, and that’s bad.”
Josef Braml of the German Council on Foreign Relations said Mr. Trump considered diplomacy a waste of time. “He is about to destroy what’s left of the liberal world order because he thinks rules and institutions help America’s rivals, China and Europe,” he said.
Laurence Nardon, director of the North American program at the French Institute of International Relations in Paris, said Mr. Trump’s behavior was a negotiation trick. “It’s like when a person leaves the room and slams the door, but is hoping the other person will run after them and follow them into the corridor,” she said.
In Washington, Democrats and some Republicans were upset at the outcome. But Mr. Trump received support from a few Republicans who cheered his tough stance.
Representative Peter T. King, Republican of New York, called the episode a “warning shot to Kim Jong-un” in keeping with Mr. Trump’s approach to negotiations. “This is the Trump style of getting things done,” he said. As to the wisdom of such a public clash, he said, “It depends on how it turns out. This president lives on a high wire, and so far it’s been working.”