North Korea’s latest missile test amplifies the challenge the reclusive, reckless regime in Pyongyang poses to global stability. The U.S. must continue to respond to this direct threat by shoring up the defenses of key allies South Korea and Japan, pressing its cyberwarfare initiative against North Korea’s missile program and — most importantly — by emphasizing multilateral diplomacy to convince China that it has more to fear from chronic destabilization than the temporary instability that would accompany regime collapse in North Korea.

The U.S. was right to embark on long-planned military exercises with South Korea despite the North’s bellicose railing against the joint training. And both Washington and Seoul are right to move forward with the installation of the anti-missile program THAAD (Terminal High-Altitude Area Defense System).

The uncertainty stemming from the impeachment of South Korean President Park Geun-hye and President Trump’s previous questioning of Pacific alliances could not have come at a worse time. But Trump’s call to allies on Monday, and Defense Secretary Jim Mattis’ previous trip to South Korea, have been reassuring. And despite the ongoing political drama in Seoul, the increased sophistication and danger of the North’s missile tests should convince even left-leaning South Korean politicians on the need for a consistent allied approach.

The political situation is more stable in Japan, and Prime Minister Shinzo Abe is right to consider bolstering his country’s anti-missile defenses as well, including possibly deploying THAAD.

For its part, the U.S. should continue to deploy cyber strikes against the North’s missile program. The initiative, as described by the New York Times, has had some success, but it’s imperfect and cannot be relied on as a singular solution to stopping Pyongyang’s quest for an intercontinental missile that could deliver a nuclear weapon to the U.S.

The most effective curb on Pyongyang remains Beijing. But China seems more concerned about THAAD than the North’s missiles.

“China has been on the horns of a dilemma,” Douglas Paal, director of the Asia Program at the Carnegie Endowment for International Peace, told an editorial writer. “They really don’t want nukes in the North attracting THAAD and things they don’t want in their neighborhood. On the other hand, they don’t want the regime to collapse and then have an American ally with U.S. troops on Chinese borders on the northern end of the peninsula. Somewhere between these two positions, there ought to be a compromise.”

Finding that middle ground will require extraordinary diplomacy at a time when the State Department is understaffed and seemingly sidelined from the key decisions in the White House, which is mulling deep cuts to the department’s budget. Now would be an opportune time for the former generals running the Departments of Defense and Homeland Security to convince Trump on the national security necessity of diplomacy.