President Donald J. Trump has spent this week making our mounting crisis with Pyongyang worse. Having repeatedly staked his prestige and credibility—and that of the United States—on preventing North Korea from becoming a full-fledged atomic power, he has now backed us all into a corner from which there may be no peaceful exit.

For months, Trump has tweeted angrily at the North Korean regime, promising back in January before his inauguration that he would not permit Pyongyang to develop a nuclear-tipped missile capable of reaching the United States. “It won’t happen,” the president-elect boasted on Twitter.

Yet just eight months later that ominous moment may be upon us. According to the Defense Intelligence Agency’s new secret assessment, North Korea is now able to develop an atomic warhead small enough to fit on top of a ballistic missile. While DIA’s analysis is hardly foolproof—missteps over Iraq’s WMD in 2002 left a lasting stain on that agency’s reputation—its assessment here is broadly supported by the rest of our Intelligence Community and deserves to be taken seriously.

In response, from his “working vacation” at his New Jersey golf course, Trump publicly threatened Pyongyang “with fire and the fury like the world has never seen” if that regime continues to taunt the United States with missiles. Notwithstanding that Trump’s belligerent talk—which, it turned out, was stated off-the-cuff, without any coordination with national security officials—was a transparent reference to hitting North Korea with nuclear weapons, the president’s “red line” had no positive effect on Pyongyang.

On the contrary, it took North Korea mere hours to cross Trump’s hollow “red line,” denouncing the president’s warning as a “load of nonsense.” In a fire-breathing statement, the head of Pyongyang’s strategic missile force announced that his country will launch four missiles towards the U.S. island of Guam in the western Pacific sometime later in August, adding a memorable put-down of our commander-in-chief: “Sound dialogue is not possible with such a guy bereft of reason who is going senile.” For added effect, Pyongyang mocked Trump for spending so much time on the golf course.

Predictably, Trump then deduced that his “fire and fury” message was insufficiently piquant. He then made more obvious nuclear threats against Pyongyang, adding that “North Korea better get their act together or they are going to be in trouble like few nations have ever been in trouble.”

True to form, however, the Trump administration seems incapable of finding one coherent message and sticking to it. Various top officials have taken a markedly different tone on the crisis. Secretary of Defense Jim Mattis, who is anything but a softie regarding our national security, professed that diplomacy was working on North Korea, implying that we’re still far away from armed conflict.

Secretary of State Rex Tillerson tried to calm Americans, stating they should “sleep well at night” over North Korea, at least implying that the White House had gotten ahead of its skis here. In a bizarre twist, Sebastian Gorka, the White House staffer whose job seems to be pompously pontificating on Fox News on behalf of the president, cut off our country’s top diplomat at the knees by stating, “The idea that Secretary Tillerson is going to discuss military matters is simply nonsensical.”

High-functioning republics aren’t accustomed to this degree of top-level dysfunction and mixed messages on issues of war and peace. It’s enough to make you feel sorry for foreign intelligence agencies that are watching all this White House chaos while trying to figure out what the hell is going on in Washington right now.

In contrast, Pyongyang is entirely on-message and seems positively gleeful in its newfound ability to threaten its ultimate enemy, the United States. Notwithstanding the fact that North Korea’s missiles, nuclear or not, stand little chance of actually reaching any U.S. territory, it’s time for Washington to accept that this unpleasant and destabilizing regime, which we know little about, is now a member of the nuclear club—and there’s no going back now.

Undeterred, Trump this morning was breathing bellicosity again on Twitter, this time threatening Pyongyang in no uncertain terms: “Military solutions are now fully in place, locked and loaded, should North Korea act unwisely. Hopefully Kim Jong Un will find another path!” In truth, we lack any military “solution” to this crisis that doesn’t run a grave risk of catastrophes such as millions of casualties, many of them civilian, even without anybody resorting to weapons of mass destruction.

There are no easy or even palatable “solutions” to our North Korea problem—military or otherwise. Trump has repeatedly criticized his predecessors in the Oval Office, implicitly finding fault with everybody doing back to Ike in 1953, for not “fixing” this issue. They didn’t because there are no “fixes” short of all-out war on the Korea peninsula.

That brings us to the real issue here, which is China. Beijing regards Pyongyang as a troublesome client whose antics cause annoyances and worse. However, for Beijing, the continuing existence of North Korea—as long as they don’t cause an atomic holocaust in Northeast Asia—is better than all the other options. A bumptious client state across the Yalu river beats having a united Republic of Korea, a close U.S. ally, on China’s border.

Beijing went to war against us in the fall of 1950 to prevent that, and they surely know that the collapse of North Korea will bring a united Republic of Korea—there’s hardly any other possible outcome. The idea that China would go to war again to prevent that outcome is highly plausible to anybody familiar with history and strategy in the region.

Indeed, China just publicly said as much. Today’s Global Times, an influential state-run Beijing daily, ran an editorial with the memorable title “Reckless game over the Korean Peninsula runs risk of real war.” It minced no words and made two highly significant statements.

First, noting that “Neither Washington nor Pyongyang really wants war, but a war could break out anyway,” it made Beijing’s position crystal clear: “If North Korea launches missiles that threaten U.S. soil first and the U.S. retaliates, China will stay neutral.” However, the editorial stated, “If the U.S. and South Korea carry out strikes and try to overthrow the North Korean regime and change the political pattern of the Korean Peninsula, China will prevent them from doing so.”

In other words, any preemptively aggressive moves by Trump against North Korea will be regarded as casus belli in Beijing, whose contempt for our president is something China’s not hiding any longer. Indeed, another editorial in today’s Global Times mocked him: “Trump is good at bluffing, but he is just a paper tiger,” citing the infamous phrase used by Chairman Mao at the height of the Cold War to throw stones at the United States.

Already commentators are comparing this week’s difficulties to the Cuban Missile Crisis of October 1962. However, this analogy is flawed because the U.S. and the Soviet Union then were serious rivals, both with global military presence. In contrast, North Korea is a broke, dysfunctional little country with a few dozen nuclear weapons. If Pyongyang didn’t possess WMDs, that regime would be of no interest, much less concern, to anyone outside Northeast Asia.

A better—and more frightening—analogy is the summer of 1914, when Europe’s great powers slid into the First World War almost by accident, allowing a regional conflict to drag in the whole continent, with catastrophic consequences that still reverberate today. In this scenario, China is Russia, which has just signaled its troublesome little client Serbia (now North Korea), whose antics provoked the crisis, that it’s got its back if Austria-Hungary (that’s us) attacks them. Which Vienna did, with consequences we all know. It would therefore be best if Trump stays off Twitter for the foreseeable future.

P.S. The title of this column derives from the famous-yet-awful book by Barbara Tuchman. My own recent book gives a more historically accurate assessment of the fateful summer 1914 crisis.

John Schindler is a security expert and former National Security Agency analyst and counterintelligence officer. A specialist in espionage and terrorism, he’s also been a Navy officer and a War College professor. He’s published four books and is on Twitter at @20committee.