The drama that is playing out now over North Korea’s nuclear and missile program—accentuated Tuesday by that regime’s large-scale artillery drill—represents one of the most dangerous challenges for U.S. national security since the end of the Cold War. It is a crisis that has been building for a long time, as North Korea has broken through the nuclear barrier and possesses fissile material sufficient for 20 to 25 nuclear weapons, by one estimate. After many failed attempts, through pressure and negotiations, to bring an end to North Korea’s nuclear program, three new elements have heightened the urgency of the situation.

First, North Korea is racing to develop an intercontinental ballistic missile capable of hitting the continental United States. In his annual New Years address in January, North Korean leader Kim Jong Un declared his country to be “in the final stage of preparation for the test launch” of such a missile. Moreover, experts warn, North Korea could at some point in the next few year years make the terrifying technological leap to a hydrogen bomb, which could be up to 1,000 times more destructive than the nuclear weapons that now comprise the North Korean arsenal.

Currently there are only two adversarial powers capable of hitting the U.S. with such awesome destructive power, Russia and China. That a regime so murderous, megalomaniacal, and unpredictable as North Korea’s—the last truly totalitarian regime on earth, holding more than 100,000 of its own people in political concentration camps—could have the potential to inflict such destruction on the United States should be considered unacceptable.

The second relatively new element is North Korea’s young leader, Kim Jong Un. Although he has been North Korea’s absolute and “supreme” leader for more than five years, the world is still learning the full measure of his ambition, paranoia, and recklessness. This is a man who has not hesitated to murder even family members, including allegedly his half-brother, to consolidate absolute control. In pushing an ambitious program of nuclear testing and missile development, he also appears more inclined to take risks to expand his power and eliminate imagined threats than his father, Kim Jong Il. Even the faint glimmers of a possible loosening of absolute political control by North Korea’s communist party, the Worker’s Party of Korea, have been suffocated under Kim Jong Un.

The third element is the tough-talking new American president, Donald Trump. While the new American administration has declared the end of “strategic patience” and vowed that the North Korean missile threat “will be taken care of,” Trump is pursuing a more “transactional” approach to engaging China in pursuit of a diplomatic resolution of the crisis. Thus, North Korea is reported to have figured prominently in the first head-to-head meeting between Trump and Chinese President Xi Jinping at the president’s Mar-a-Lago estate recently.

It is difficult to exaggerate the stakes here. A preemptive strike on North Korea’s military facilities would have nothing like the limited scope of containment or punishment conveyed by the recent American cruise missile strike on Syria. To accomplish anything meaningful, an American strike on North Korea would have to be on a scale many, many times larger. Even then, it would likely fail to eliminate all of Kim’s short-range missiles (many of which are mobile) or his nuclear weapons (which are surely hidden). And so it could bring on the worst of all scenarios, a furious military response from North Korea with its nuclear arsenal still intact, putting millions of lives in South Korea and potentially Japan as well at imminent risk.

It is no wonder, then, that the Trump administration has rather quickly discovered the virtues of a diplomatic track. Yet the six-party talks, launched in 2003 among Japan, South Korea, Russia, China, the U.S., and North Korea to find a diplomatic formula to halt North Korea’s nuclear program, have been suspended since 2009. While efforts to resume those talks have been surrounded by mutual threats and false starts, North Korea has raced ahead to build an ever more menacing nuclear weapons program, which is now bringing the region to a crisis potentially more serious than anything since the end of the Korean War.

As the old saying goes, however, in crisis there is both danger and opportunity. In his summit with the Chinese leader, President Trump clearly became aware of the complexity of the situation as seen by the Chinese regime: North Korea is not a mere client state of China, and a Chinese attempt to use its economic leverage (such as cutting off essential food and oil supplies) to pressure the Kim dictatorship could bring unpredictable consequences, including, the Chinese fear, a collapse of the North Korean regime that would send millions of North Korean refugees streaming across the border into China.

Yet the Chinese leadership is clearly deeply frustrated with North Korea’s erratic and menacing behavior, which increasingly endangers China’s vital interests in regional peace and stability. It is this incipient shift in China’s thinking that presents the most promising opportunity for a breakthrough on the long-stalled diplomatic front. Whether through a resumption of the six-party talks or initiation of direct three-party negotiations involving China, the U.S., and North Korea (with the U.S. closely coordinating with Japan and South Korea), a diplomatic breakthrough must be pursued.

It is probably not realistic at this point to think that North Korea will give up its current stockpile of nuclear weapons. But at a minimum, resolution of the current crisis requires a version of what my Stanford colleague Siegfried Hecker first proposed—that the Kim regime commit to “four no’s”: no more bombs that would enlarge its current stockpile; no better bombs, and hence an end to nuclear weapons testing; no missile testing or production that would enhance their current range; and no export of bombs or other nuclear weapons or missile technology.

These will be hugely difficult goals to achieve through diplomacy. But there are some inducements the United States and its allies could offer the North that might help bring it (reluctantly) to agree. There is also significant leverage that the U.S. and China could jointly bring to bear on Kim Jong Un to raise the costs of his continuing on the current immensely dangerous path. And there are some things that the U.S. could offer China that might help persuade it to assume the risks of pressuring an unstable and unpredictable “ally.”

North Korea has depicted its relentless pursuit of nuclear weapons as a defensive maneuver to deter an attack on it by the United States, Japan, and South Korea. But the problem is that any new weapon changes the balance of power among adversaries. The greater North Korea’s nuclear weapons capacity, the more emboldened it may be to engage in reckless, bullying behavior in the region.

We are now at an existential moment, where North Korea must be confronted with a fundamental choice: Either it will face crippling global economic sanctions (including a Chinese oil embargo) that could trigger the collapse of the regime, or it will negotiate a verifiable end to its nuclear weapons development program.

The North’s willingness to give up its weapons program would serve as a prerequisite for talks about new ways to defuse tensions on the Korean peninsula—including a peace treaty that recognizes the North Korean regime, normalization of relations between the U.S. and North Korea, and flows of investment and trade that would help to modernize the North’s economy. Toward the end of Bill Clinton’s presidency, when he was pursuing a diplomatic approach to resolving the North Korean nuclear threat, former U.S. Defense Secretary William Perry found the North Koreans to be seriously interested in the prospect of normalizing relations with the U.S.

With respect to economic incentives, more would be possible for North Korea in terms of investment and trade from the U.S., Japan, and South Korea to the extent that North Korea takes the reform path that China did in 1978 under Deng Xiaoping. This would mean not only greatly accelerating market-oriented reforms in the North but also closing down the country’s concentration camps and allowing a modicum of political openness as well. America’s goal in this process would not be to bring an end to the North Korean regime, but to bring an end to its failed policies, which propel it toward militarism and aggression to cover up for its manifest developmental failures.

What could induce China to take risks for peace? One irony of having elected a U.S. president who repeatedly threatened a trade war with China is that a retreat from those ill-considered warnings now appears as a conciliatory gesture. But there is something more the U.S. can offer. China’s fear of a sudden collapse of the Kim regime is not just about massive refugee flows. It also dreads a “German-style” reunification, in which South Korea would politically absorb the north and China would then confront a newly powerful American ally—hosting nearly 30,000 American troops—right on its border.

Because the North Korean regime is not irrational, it will probably opt for the above deal under Chinese pressure and American inducements. But should Kim Jong Un balk and his regime then unravel, leading to reunification under a democratic constitution, American troops would no longer be needed to stabilize the Korean peninsula, and they could be withdrawn. Neither should there be a need for the missile defense system (Terminal High Altitude Area Defense, THAAD) that is now being deployed in South Korea, over real but misplaced Chinese concerns that the system is aimed partly at them. Agreement to withdraw THAAD and American troops following Korean reunification would be huge elements of strategic reassurance for China. On the flip side, however, the U.S. retains coercive inducements to get China on its side, namely the option of imposing secondary sanctions on Chinese banks that do business with North Korean front companies.

This proposed bargain involves serious risks and distasteful elements. But a preemptive war to disarm North Korea would bear far more cataclysmic risks. So would a continued policy of “strategic patience” or confusion while North Korea simply muscles its way forward to a nuclear missile that can reach Washington, D.C.