Russia’s invasion of Ukraine raised the specter of a wider conflict involving NATO. Such a war almost certainly would go nuclear. The consequences would be too terrible to contemplate.

Nuclear weapons have been used only twice against a non-nuclear state to end a horrendous conventional conflict. The Cold War featured a dangerous nuclear stand-off between two superpowers. However, fear of escalation caused both Washington and Moscow to avoid direct conventional confrontations, despite multiple covert and proxy conflicts.

Similar concerns caused President Joe Biden to be extremely careful in his policy toward Ukraine. He made clear even before Russia invaded Ukraine that the U.S. would not directly intervene, a commitment he reiterated later. Although a month into the war, President Biden carelessly raised questions about his intentions, the White House’s denial of any policy change was generally believed. Indeed, that stance reflected near unanimous agreement within the foreign policy community.

However, Washington appears far more willing to contemplate war with China. On his recent Asia trip President Joe Biden suggested for the third time that Washington would go to war to defend Taiwan. As before, his officials rushed to declare that U.S. policy remained the same. The PRC and other nations might have believed the first Biden denial, like with President George W. Bush. This time, Biden was seen as speaking what he believes, inadvertently replacing ambiguity with clarity.

Indeed, U.S. policy toward defending Taiwan has never been “no.” Instead, after Washington broke relations with Taipei, America’s position became “maybe.” “Strategic ambiguity” was intended to simultaneously deter Chinese action with the implicit threat of possible/​likely war and convince Taiwanese officials not to provoke Beijing.

Today the main debate within the foreign policy community is whether to move from ambiguity to clarity. Although members of what Ben Rhodes called “the Blob” divide on this question, they appear to overwhelmingly believe that Washington should act if the PRC attempts to force reunification. For instance, Richard Haass, president of the Council on Foreign Relations, recently advocated making an explicit commitment to Taiwan’s defense.

In years past the question was largely academic since Beijing lacked the military capacity to seize the main island. Amphibious operations are among the most difficult military operations to mount; Taiwan benefits from a defensive barrier of as 110 miles of open sea.. However, the PRC has devoted significant resources to its armed forces and made Taiwan a top priority. Although Russia’s travails in Ukraine offer a caution to the Chinese government—possession of the latest equipment does not mean it will be used effectively—Beijing has increasingly developed the ability to undertake a range of coercive steps, including invasion.

Moreover, popular sentiment backs the government’s claim that the island is part of China. Nationalism is strong even among the young, who may have had no contact with Taiwan. Nevertheless, many of them believe in forced reunification if necessary. Uniformly they oppose American intervention.

This means the possibility of war is real, even if still unlikely, at least in the near future. The Quincy Institute’s Michael Swaine observed: “Beijing is not about to launch an effort to seize Taiwan by force, although this possibility cannot be discounted over the longer term if present trends continue.” How each capital would respond in a crisis is unknown, but rational policymakers on both sides acting rationally in what they believe to be their respective nations’ interests could “sleepwalk into war.

The consequences of conflict between Washington and Beijing would be dire. The U.S., joined by much of Europe and at least a smattering of allies and friends elsewhere, likely would begin by initiating economic warfare, which would be costly for both sides. Washington might intensify economic pressure by, for instance, interdicting commerce with the PRC, including energy and food shipments.

Even a limited war would not be nothing like the insurgent campaigns of late. But combat would not likely be restricted to trade routes. The intensity of air and naval conflict would recall the Pacific War between the U.S. and Japan, much heightened by the proliferation of missiles and possible use of nuclear weapons. The sinking of just one aircraft carrier could doom several thousand sailors.

Worse, such a war would almost inevitably escalate and expand. If the U.S. sought to thwart an invasion, it would have little choice but to attack mainland bases, while the PRC could not leave installations on American territory, such as Guam, untouched. And if Washington’s allies allowed use of bases against China, they would turn themselves into targets. The pressure on both governments to escalate, both militarily and politically, would be great. Ominously, a recent U.S. wargame found that Beijing would likely threaten to use nuclear weapons early in the fight.

Although relations between the two governments are not good, they should place war avoidance at the top of their diplomatic agenda. The objective should not be to reconcile their positions, which is highly unlikely, but to reach a modus vivendi that keeps the peace. Both sides, along with Taiwan, would have to make concessions to avoid conflict.

Agreement could start with reciprocal commitments: Taipei would eschew any bid for independence, Washington would forswear any military relationship with Taiwan, and China would commit to a peaceful outcome. Furthermore, Taiwan could drop its campaign for separate entry into international organizations, the U.S. could reduce its naval presence near the island, and the PRC could redeploy missiles away from Taiwan.

Again, the objective would be to give the three parties enough to dissuade them from going to war. Had the U.S. and Europe taken such a stance toward Russia and Ukraine, Moscow’s invasion might have been avoided. Both Beijing and Washington need to work together to avoid the circumstances most likely to lead to war.

NATO and Russia in battle would be terrible; conflict between America and China would be even worse. Washington and Beijing must work past their differences to ensure that their relationship never collapses into armed conflict. That effort should begin now.