“I have to hand it to Kim Jong-un,” said Jon Wolfsthal, a scholar in the nuclear policy program at the Carnegie Endowment for International Peace and a former senior director for arms control and nonproliferation in the National Security Council under President Barack Obama. “He has played this extremely well in terms of appearing to be the reasonable conciliator and the source of stability, whereas Donald Trump is the wild card.”

But Mr. Trump’s flip-flopping and disregard for how it might affect allies could unnerve regional partners that count on the United States to play a leadership role as a protector in the region — not only against North Korea, but also as a bulwark against a rising China.

In recent weeks, Mr. Trump has not only threatened a trade war with China but has announced policies that would hit allies as well. Despite a close relationship with Mr. Abe, Mr. Trump’s administration did not grant Japan an exemption from steel and aluminum tariffs, and earlier this week it announced a trade investigation that could set off auto tariffs against allies, including Japan and South Korea.

Such aggressive actions on trade raise the potential that Asia’s leaders may drift toward China, even if they do not entirely trust the administration of Xi Jinping, the country’s autocratic president.

“The dilemma lies in the fact that most Asian allies depend on the U.S. for their countries’ security while they depend on China for their economic prosperity,” said Yang Moo-jin, a professor of Korean studies at Kyungnam University in Changwon, South Korea.

If the United States pulls back in the region, American allies worry China may exploit the vacuum, becoming more aggressive in pursuing territory in the South China Sea and using economic incentives to exert control over smaller countries in Southeast Asia.