For a half-century, America has avoided war with China over Taiwan largely through a delicate balance of deterrence and reassurance.

That equilibrium has been upset. China is building up and flexing its military power; hostile rhetoric emanates from both Beijing and Washington. War seems likelier each day.

It’s not too late to restore the kind of balance that helped to keep the peace for decades, but it will require taking steps to ease China’s concerns. This will be difficult because of Chinese intransigence and the overheated atmosphere prevailing in Washington. But it is worth the political risk if it prevents war.

Deterrence came in the form of the implied use of U.S. military force to thwart a Chinese attack on Taiwan. Reassurance was provided by the understanding that the United States would not intrude on decisions regarding Taiwan’s eventual political status.

The United States and its regional allies must continue to create a robust military deterrence. But U.S. leaders and politicians also need to keep in mind the power of reassurance, try to understand China’s deep sensitivities about Taiwan and should recommit — clearly and unequivocally — to the idea that only China and Taiwan can work out their political differences, a stance that remains official U.S. policy.

During the Cold War, Beijing and Washington signed a series of communiqués related to Taiwan. One of them said the United States “reaffirms its interest in a peaceful settlement of the Taiwan question by the Chinese themselves.” This and other wording was deliberately ambiguous, but it was accepted by all sides as a commitment to avoid rocking the boat. China still views this arrangement as binding.

To be clear, it was China that began rocking the boat first.

Since 2016, when Tsai Ing-wen of the independence-leaning Democratic Progressive Party was elected president of Taiwan (succeeding a more China-friendly administration), Xi Jinping has repeatedly brandished China’s military power with large-scale military exercises and other pressure tactics apparently meant to discourage independence sentiment on Taiwan.

U.S. political figures have rightly responded with rhetorical support for democratic Taiwan, by supplying it with weapons and by strengthening the U.S. military presence in the region. But the American reaction is also pouring fuel on the fire.

I have worked on U.S. defense strategy in various military roles for more than a decade. I recently traveled to Beijing, where I met with Chinese government and military officials, leading academics and experts from Communist Party-affiliated think tanks. During these talks it was clear that Beijing is far less concerned with U.S. efforts to enhance its military posture in the region — the deterrence side of the equation — than with the political rhetoric, which is seen in China as proof that the United States is moving away from past ambiguity and toward supporting Taiwan’s de facto independence.

They have plenty of evidence to point to.

In December 2016, Donald Trump became the first U.S. president or president-elect since the normalization of China-U.S. relations in 1979 to speak directly with a Taiwanese leader, when Ms. Tsai called to congratulate him on his election victory. President Biden has, on four occasions, contradicted the U.S. policy of ambiguity by saying we would support Taiwan militarily if China attacked. The number of U.S. Congress members visiting Taiwan — which China views as overt support for the island’s independence — reached a decade high last year, including an August 2022 trip by Nancy Pelosi, the speaker of the House at the time and the highest-ranking U.S. official travel to Taiwan since the 1990s. That has continued this year: In June a nine-member congressional delegation, the largest in years, arrived in Taipei.

Provocative legislation has not helped. Last year the Taiwan Policy Act, which articulated support for Taiwan’s role in international organizations, was introduced in the Senate, and in July of this year the House passed a similar act. House Republicans introduced a motion in January to recognize Taiwan as an independent country.

Actions like these put great pressure on Mr. Xi, who won’t tolerate going down in history as the Chinese leader to have lost Taiwan. That would be seen in Beijing as an existential threat, potentially fueling separatist sentiment in restive regions like Tibet and Xinjiang.

For now, lingering doubts over Chinese military capabilities and the specter of U.S. and allied retaliation are enough to restrain Mr. Xi. But if he concludes that the United States has broken, once and for all, from its previous position on Taiwan and is bent on thwarting unification, he may feel that he must act militarily. The United States might be able to build the necessary military power in the region to deter a Chinese war of choice. But the level of dominance needed to stop Mr. Xi from launching a war he sees as necessary might be impossible to achieve.

Reassuring China would require Mr. Biden to reiterate that the United States does not support Taiwanese independence or oppose the island’s peaceful unification with China and that, ultimately, Taiwan’s fate is up to Taipei and Beijing. It would mean moving away from attempts to create international space for Taiwan and chastising Beijing when it pulls away Taipei’s diplomatic partners. The White House would also need to use what leverage it has to discourage members of Congress from visiting Taiwan and threaten to veto provocative legislation.

There would doubtless be blowback in Washington and Taipei, and Mr. Xi may already have made up his mind to seize Taiwan, regardless of the U.S. stance. But a politically neutral position on Taiwan is what the United States has followed for decades. Presidents Bill Clinton, Barack Obama and George H.W. and George W. Bush advocated peaceful dialogue between Taipei and Beijing to resolve their differences.

There also are longer-term repercussions to consider: If the combination of deterrence and reassurance fails and China attacks Taiwan, it will set a precedent in which Chinese leaders kill and destroy to achieve their goals. But if a pathway remains for China to eventually convince Taiwan’s people — through inducements or pressure — that it is in their interest to peacefully unify, then that may be a China that we can live with.

In the best-case scenario, the United States and China would reach a high-level agreement, a new communiqué, in which Washington reiterates its longstanding political neutrality and China commits to dialing back its military threats. This would avert war while giving China political space to work toward peaceful unification. That might mean using its clout to isolate Taiwan and eventually convince the island’s people that it should strike a deal with Beijing. But it isn’t Washington’s place to prevent the unification of the two sides — only to ensure that doesn’t happen through military force or coercion.

A war between the United States and China over Taiwan could be the most brutal since World War II. As politically difficult as it may be, U.S. leaders have a duty to try to prevent conflict, and that means speaking more softly but carrying a big stick.

Oriana Skylar Mastro (@osmastro) is a fellow at the Freeman Spogli Institute for International Studies at Stanford University and a nonresident senior fellow at the American Enterprise Institute. She is the author of the forthcoming “Upstart: How China Became a Great Power.”

The Times is committed to publishing a diversity of letters to the editor. We’d like to hear what you think about this or any of our articles. Here are some tips. And here’s our email: letters@nytimes.com.

Follow The New York Times Opinion section on Facebook, Twitter (@NYTopinion) and Instagram.