Opinion writer

Remember how American ­engagement with China was going to make that communist backwater more like the democratic, capitalist West?

For years, both Republican and Democratic administrations argued that the gravitational pull of ­U.S.-dominated international institutions, trade flows, even pop culture, would gradually reshape the People’s Republic, resulting in a moderate new China with which the United States and its Asian allies could comfortably coexist.

Well, Chinese President Xi Jinping has just engineered his potential elevation to president for life. This is the latest proof — along with China’s rampant theft of U.S. intellectual property, its military buildup in the South China Sea and Xi’s touting of Chinese-style illiberal state capitalism as “a new option for other countries” — that the powers-that-be in Beijing have their own agenda, impervious to U.S. influence.

“We in the U.S. foreign policy community have remained deeply invested in expectations about China . . . even as evidence against them has accumulated,” two self-critical ex-Obama administration Asia hands, Kurt M. ­Campbell and Ely Ratner, admit in the current issue of Foreign Affairs magazine.

If there had been more such candor earlier, we might not have President Trump, whose rise owes much to a public backlash against the perceived costs — especially in jobs lost to Chinese imports — of the erstwhile bipartisan China policy consensus.

Trump’s approach to China, a weird mix of open pleading for help with North Korea, fawning praise for Xi and threatened punitive tariffs on Chinese goods, hardly seems calculated to lay the basis for a more sustainable policy.

The United States needs a long, sober policy rethink. Step one: ­Remember that friendlier ties with Beijing seemed like a good idea, even a brilliant one, when then-likely presidential candidate Richard M. Nixon first proposed it during the Cold War, also in the pages of Foreign Affairs, half a century ago.

Geopolitically, Mao Zedong’s China was isolated and adrift, hostile to both the Soviet Union and the United States. Nixon rationally supposed that the United States could benefit by drawing closer to Beijing and using it as a counterweight to the greater threat of Moscow. And he acted on this after becoming president in 1969.

Subsequent presidents preserved Nixon’s policy and expanded upon it, even after one of its basic assumptions, the permanence of the Soviet empire, proved wrong, much to the experts’ astonishment.

American foreign-policy thinkers did not, however, take the end of the Cold War as a cue to back away from what had started as a marriage of anti-Soviet convenience, even after Beijing proved its brutality in the mass­acre at Tiananmen Square in 1989.

Instead, the Cold War’s dramatic end spawned a new and loftier rationale for the policy, which had acquired a life of its own. Americans believed that history might be flowing inevitably in favor of free markets and free elections. All we had to do was stay patient, maintain our influence and let China evolve. There would be no long-term conflict between U.S. self-interest and U.S. values.

The fact that this also happened to be the position most congenial to American business, hungry for access to China’s cheap labor, seemed like a feature, not a bug.

Now it’s evident China has been gaining leverage over the political and economic leaders of the United States, and has learned how to make them defer to its norms.

Just ask Apple chief executive Tim Cook, who has obeyed a Chinese legal mandate to store individual Chinese iCloud customers’ data in the communist state, where authorities can demand access. This is the company whose TV ad during the 1984 Super Bowl touted Apple products as the alternative to Orwellian dystopia.

As for geopolitics, the old Nixon-Kissinger gambit is played out, and increasingly Moscow and Beijing cooperate to counter the United States, whether in the Middle East or the Korean Peninsula.

It’s possible that Xi has overreached politically and that his new power grab will galvanize his enemies, leading to new political instability within China, accompanied by a meltdown of the country’s rickety financial system. In that case, the United States’ challenge will be to contain the damage to the rest of the world.

In the likelier event that China continues to rise, the United States will face a choice: We can try to beat China at its own games — raw geopolitics and mercantilist economics — as Trump seems to prefer. Or we can play to our historic strengths, shoring up our domestic democratic and capitalist institutions, and re-investing in traditional alliances with democratic nations in the Asia-Pacific region.

If there’s one clear lesson from the past 50 years of U.S. policy toward China, it’s that nothing is inevitable in international politics, or irreversible. From now on, the United States must act accordingly.

Read more from Charles Lane’s archive, follow him on Twitter or subscribe to his updates on Facebook.