WITH hindsight, the last time Vladimir Putin visited Xi Jinping in China, just three weeks before Russia invaded Ukraine, was a moment of hubris — two supremely confident leaders marking their bid to shake up a world organized by and for the US and its allies. Well, they certainly shook it up, even if not in the way they intended.

Putin’s catastrophic error in attempting to invade a neighbor the size of France as though it were a glorified training exercise has, by some estimates, resulted in halving Russia’s military strength. The supercar that was China’s economy, meanwhile, has sputtered into the slow lane, with forecasts of when it will overtake the US in current dollar terms pushed into the future. So, it’s tempting to imagine Xi and an increasingly dependent Putin humbled at their reunion, the sinews of their “unlimited’’ bond already tearing. But that, to borrow a wonderful phrase from Sarah Paine, a professor of history and grand strategy at the US Naval War College, would be playing “half-court tennis” — the kind where you never see the next ball coming because you aren’t paying attention to the other side’s game.

Paine says that to understand why China and Russia do what they do, you need to see them for what they are: continental powers in a global order that was organized over centuries by successive maritime powers, first British and then American. The difference is big. Maritime nations ultimately are about trade, and that in turn tends to attract allies and encourage the development of international rules because they enable wealth creation. The territorial wars that a continental world order based on spheres of influence implies are, by contrast, huge destroyers of wealth and value. Ukraine is a clear example.

Sea powers do attack and subdue other countries, as the US did in Iraq and the British Empire in its many colonies. They also break the rules when it suits them. Yet the expeditionary wars they fight are necessarily smaller and overseas, taking a far lower toll on lives and wealth at home. Rarely do they conquer territory for its own sake, focusing more on containment and regime change to assert their interests. They also prefer stable to unstable neighbors because failed states tend not to do much trade.

Continental powers, by contrast, care a lot about territory and will, at times, pursue its acquisition to their own economic detriment. Historically, continental powers also are prone to destabilizing neighbors if they can, either to later absorb them or ensure that no powerful threat emerges on their doorstep. That habitual, sometimes justified and, at other times, self-fulfilling paranoia also weakens their most likely trading partners.

“It’s what Putin is doing now” in Ukraine, says Paine, who in her book The Wars for Asia describes this process of neighborhood destabilization, followed by conquest and absorption as the Russian Empire’s successful MO over a period of centuries. It’s possible for a country to change from continental mode to join the maritime order, she says — the US did it — but that must come from within.

China operates a little differently, and with its massive exports is very deliberately acquiring aspects of a maritime power that Russia hasn’t. Yet Xi and Putin are drawn together by an even more potent force than their geopolitical positions: self-preservation.

The Communist Party of China can’t afford to have Taiwan remain an offshore model of a successful democracy that creates better outcomes for a mainly Han Chinese population than does the Party. Nor could Putin afford to allow Ukraine to become the European success story that Ukrainians demanded during the so-called Maidan protests of 2014. These priorities are non-negotiable for Putin and Xi, and therefore dangerous. They already led to one war and could produce a second.

Both men believe they are being squeezed by the West, which is trying to contain ambitions they consider vital interests. Xi and Putin will endure economic opportunity costs and suppress any domestic opposition to achieve them. The result is an emerging form of Cold War that aligns Eurasia’s continental powers — including China, Russia, Iran and North Korea — against the US and its allies in Europe and Asia, including Australia, Japan, South Korea, the UK and most of the European Union.

Whether or not Putin gave Xi details of his imminent plans to invade Ukraine at their 2022 meeting, the common goal outlined in their joint statement was clear: the “redistribution of power in the world,” an end to US dominance and the redefinition of democracy and human rights as whatever a given government says they are.

For sure, Xi didn’t anticipate any more than Putin that Russia’s war machine would be humiliated in Ukraine or that the West would respond not by imploding but also uniting and expanding. In the same way, it’s doubtful that when the two leaders met in February 2022, Xi expected the current conflagration in the Middle East.

But in terms of a zero-sum geopolitical confrontation with the US, trouble in Ukraine or the Middle East is a win for China. Both draw on US resources and attention. Both upset the status quo. As the US becomes embroiled in Israel’s revenge against Hamas in Gaza, its alliances with the Gulf Arab states will be strained, creating opportunities for Xi.

So, just as Putin immediately laid the blame for Hamas’ horrific attack on Israeli civilians at the door of the US, China has avoided any public condemnation of Hamas, while criticizing Israel for its collective punishment of Palestinians in response.

By courting the Muslim world in this way, Putin and Xi are doubling down on their success in persuading the so-called Global South that the problem isn’t Russian aggression in Ukraine or Hamas’ grotesque terrorist acts in Israel, but rather the continued colonialism of the US and Europe. Never mind Russian suppression of Muslim Tatars in occupied Crimea or Chinese internment of Uyghur Muslims in Xinjiang province. The narrative works because the Palestinian injustice, with its colonial overtones and deep history in centuries of struggle over control of the Holy Land, can enrage the Arab Street like no other.

So get ready for more tenacious anti-Western messaging from Xi and Putin this week. They may have suffered some economic setbacks, and in Russia’s case, military, but when it comes to rallying other nations to their cause, they’re making good progress.

BLOOMBERG OPINION