The escalating trade war between the United States and China has sometimes been characterized as what game theorists would call a prisoner’s dilemma. A prisoner might benefit by informing on another, but only if the second prisoner does not also betray the first. If both inform, both lose; the best outcome for both occurs if both remain silent. Likewise, an economy can benefit from raising tariffs on another, but only as long as the latter doesn’t retaliate; in a tit-for-tat scenario, both lose. In that case, the hope becomes that the losses force the beleaguered parties to recognize their mistake and return to cooperation.

It is a tidy argument. But it does not explain the U.S.-China trade war, for a simple reason: Neither side’s motivations are as straightforward as the prisoner’s dilemma implies. They much more closely resemble those described by the ancient Greek historian Thucydides in his account of the Peloponnesian War.

To some extent, that 27-year conflict was precipitated by a series of smaller-scale trade and shipping disputes involving lesser city-states. But more fundamentally, Thucydides observed, “it was the rise of Athens,” an emerging power, and “the fear that this instilled in Sparta,” the leading established power, “that made war inevitable.”

Having transformed itself into a major trading and maritime power, Athens displayed a “growing entitlement, sense of its importance and demand for greater say and sway.” Similarly, Chinese President Xi Jinping operates according to a Sinocentric worldview, essentially demanding special privileges out of a deeply rooted sense of entitlement going back to the Han dynasty.

Already, China enjoys considerable benefits from its World Trade Organization membership, despite lacking some key rules and structures, such as a WTO-compliant intellectual-property regime. Xi wants to retain and expand those benefits, while exerting more influence over the global order.

Sparta responded to Athens’ rise with, as Thucydides put it, “fear, insecurity and determination to defend the status quo.” That is exactly what the world is seeing from U.S. President Donald Trump’s administration, as it attempts to contain China and assert America’s “greatness.” The question is whether this dynamic will lead both countries into the so-called Thucydides Trap of insecurity-induced conflict.

To answer that question, we might start by reconsidering two key assumptions: that in a liberal democracy, government policy reflects the will of the people and that in a market-based economic system, agents generally act rationally. After all, these two assumptions imply that people’s will matches their interests and that the U.S. government is acting in those interests. Launching a broadly destructive trade war — in which the U.S. stands to suffer the most — does not meet these conditions.

In reality, democratically elected leaders can distort the popular narrative and convince enough people to support policies — think Trump’s 2017 tax cut or Brexit — that subvert their own interests. (A leader like Xi is unconstrained by electoral politics, but still must deliver reasonably positive outcomes to maintain legitimacy.) Moreover, as the emergence of “behavioral economics” reflects, economic actors do not always act rationally; the complexities of human psychology, including inchoate fears and herd responses, also play a role.

Viewed through the lens of “behavioral” political economy, the likelihood of the U.S. and China becoming ensnared in the Thucydides Trap seems strong. But it isn’t guaranteed, not least because a major shock could still convince one or both parties to be more flexible.

Worries about the trade war have already raised fears of recession and sent stock markets plummeting. A crash could well be enough to force Trump to back down, especially given the looming 2020 presidential election.

China might also face economic pressure: already, a variety of macroeconomic indicators, including industrial production and investment growth, are flagging. Moreover, the ongoing turmoil in Hong Kong could sap China’s motivation to escalate the conflict with the U.S.

In the longer term, a shift toward foreign direct investment could mitigate the trade war’s effects. In the 1980s, when the U.S. introduced market-distorting measures to reduce its trade deficit with Japan — for example, forcing Japan to adopt “voluntary export restraints” — Japanese businesses offset the damage by using FDI to enter the U.S. domestic market.

Trade and immigration often meet strong political resistance, but well-managed FDI is generally welcomed. Recognizing this, China might follow in Japan’s footsteps, though the recent drop in Chinese investment in the U.S. — from $29 billion in 2017 to $5 billion in 2018 — suggests that it would take a while for such investment to offset the effects of the trade war.

But the world cannot just stand by and hope that the U.S. and China resolve their differences; the two countries are too influential and their motivations too irrational. That is why the European Union and the countries in the Comprehensive and Progressive Agreement for Trans-Pacific Partnership (CPTPP) should take the advice of Zaki Laidi, Shumpei Takemori and Yves Tiberghien, and create a Euro-Pacific Partnership free-trade area.

This would not protect the world from the consequences of a full-blown war between the U.S. and China. But it would go a long way toward insulating them from reckless economic competition between the world’s longtime hegemon and the rising power that it fears will displace it.

Koichi Hamada is a professor emeritus at Yale University and a special adviser to Prime Minister Shinzo Abe. © Project Syndicate, 2019