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.