IT WOULD be difficult to overstate the danger posed by North Korea’s launch of an intercontinental ballistic missile potentially capable of reaching U.S. territory. The exercise brought this country, and the world, that much closer to the moment — perhaps only a couple of years away — when the Pyongyang regime may be able to arm such a missile with a nuclear warhead and threaten not only Alaska and Hawaii but also Washington, Oregon and California. Against that deeply destabilizing threat, the Trump administration must now rally not only Republicans and Democrats within this badly polarized country but also the widest possible range of like-minded countries around the world.

Is President Trump capable of doing that? He deserves credit for restoring urgency about North Korea’s weapons programs, having openly disavowed his predecessor’s ineffectual stance of “strategic patience,” before the latest missile test. Mr. Trump was also well-advised to seek help from China, Pyongyang’s sponsor, in reining in the North, even if that is not exactly a new idea. Less admirable, alas, was the manner of his outreach to Beijing — a series of tweets about President Xi Jinping that ranged from embarrassingly fawning to prematurely frustrated. This is no way to conduct diplomacy, but then again, Mr. Trump has not yet even nominated anyone to fill key State Department positions for East Asia, international security and nuclear proliferation issues.

Mr. Trump is an unlikely orchestrator of a multilateral approach, given both his erratic conduct and his off-putting rhetoric about “America first.” Still, other countries might yet be induced to follow his lead if he can convince them both that he has a credible plan and that the alternative might be far worse — war in Northeast Asia. The third way between more fruitless talks and a catastrophically risky preemptive war would be to impose on the North, for the first time, truly stringent economic sanctions, comparable to the ones that brought Iran to the nuclear bargaining table.

To be sure, that could be a recipe for short-term tension with China, because it’s Chinese banks that help North Korea trade in U.S. dollars and Chinese companies that continue to supply North Korea with food, energy and “dual-use” materiel that helps its nuclear program. And China might not be the only nation inconvenienced if there were a serious effort to choke off the North’s supply of hard currency; North Korean workers have been contracted out in Russia, Qatar and, until last year, even democratic Poland. Early indications were not auspicious for such an effort; on Tuesday, Russia and China jointly called on the United States and South Korea to abandon military exercises in return for a suspension by North Korea of missile testing.

Washington and Seoul rejected the false equivalence of that approach, demonstrating that their essential solidarity is intact despite recent disagreements between the new presidents in each capital — and Pyongyang’s obvious efforts to shake it. From this, Mr. Trump must construct a widening circle of cooperation against the North, a long-term effort that will require overcoming the resistance of skeptical governments — and his own most impulsive tendencies.