Recently, China and Russia have challenged the international order by giving each other diplomatic backing to confront Ukraine and Hong Kong, respectively. But Western observers have mostly misunderstood the countries' reasons for building closer ties with each other. They have been motivated less by shared material interests than by a common sense of national identity that defines itself in opposition to the West and in support of how each views the legacy of traditional communism. Moscow and Beijing have disagreements about the future order they envision for their regions. But they agree that the geopolitical order of the East should be in opposition to that of the West—and that has led to significantly closer bilateral relations.

Some Western observers have placed an excessive emphasis on Sino-Soviet tensions during the Cold War era, also arguing that the relationship between Beijing and Moscow is likely to remain fragile because of developments in both countries since the 1990s, including democratization in Russia, globalization in China, and the rapid rise of a middle class with access to outside information in both countries. To the extent that China and Russia built ties, these observers believed that the relationship would be a marriage of convenience that would be trumped by other national interests, including good relations with the West.

But most Westerners have failed to understand that, since the 1990s, officials in China and Russia have deeply regretted the Cold War tensions between their countries. They understand that the problem was less a lack of overlap in national interest than national identities skewed by ideological claims to leadership. Moscow made a critical mistake in expecting that Beijing would acquiesce to its leadership, accepting a role as a junior partner. China's leadership did not accept that role, given its obsession with ideological superiority.

Current policymakers in both countries are determined not to repeat these problems. Although China is now in the position to act as the dominant partner in the relationship, it has shown restraint. Leaders in Moscow and Beijing want to avoid allowing chauvinistic nationalism in either country to trump their mutual national interest in minimizing the influence of the West in their respective regions.

To that end, the governments of both countries have been consciously emphasizing foreign policies that dismiss Western legitimacy, while carefully refraining from commenting on the foreign policy ambitions of each other. Chinese President Xi Jinping has described a so-called China Dream that involves a new geopolitical order in Asia built by the governments of that region—with Beijing playing an outsize role. Russian President Vladimir Putin has likewise clarified that his goal is to create a Eurasian Union, in which relations between former Soviet states are determined by Moscow. Both states have accused the United States of following an aggressive Cold War mentality by trying to contain their rightful ambitions in their regions.

There are at least six reasons to believe that this tacit partnership between Russia and China is durable. First, Putin and Xi have been relying on very similar ideologies to justify their rule. They both emphasize pride in the socialist era, Sinocentrism or Russocentrism that seeks to extend the countries’ existing internal political order outward, and anti-hegemonism. Although Russian nationalism includes a strain of xenophobia that fueled demagoguery against China in the 1990s, Putin has sharply restricted that aspect of it and avoids direct references to China's rise. Sinocentrist ideology has similarly tended to fuel tensions with Russia—including by challenging Russian claims in Central Asia, which had previously been part of the Soviet Union. But China’s current leaders have shown, in international meetings and forums, including the Shanghai Cooperation Organization, that they are prepared to show deference to Russian political and cultural influence.

Second, China and Russia are underscoring their historical differences with the West and emphasizing their Cold War­–era divide with the United States. Officially sanctioned writing in both countries makes scant mention of the Cold War Sino-Soviet dispute. Although some Chinese historians had previously acknowledged that the Korean War began because of North Korean aggression in South Korea, the latest textbooks universally blame the United States for the war. Likewise, policymakers and analysts in both countries increasingly argue that the West never changed its imperialist Cold War mindset (as evidenced by its alleged support for so-called color revolutions in Ukraine and Hong Kong). This rhetoric implies that China and Russia are still obliged to resist its influence and help create a new international order.

Third, both countries have argued that the global financial crisis of 2008 demonstrates that the West's economic and political model is on the verge of failure and inferior to their own models. (The latter half of this argument has resonated more in China than in Russia.) Leaders in both Beijing and Moscow have refused to allow civil society to pose a threat to their rule, cracking down more ruthlessly in 2014 than at any time since the beginning of the 1990s.

Fourth, Putin and Xi have emphasized the importance of Chinese-Russian bilateral relations in the face of outside threats. This is a corollary of both governments' emphasis on the importance of communism, whether as the currently reigning ideology (in China) or as a positive historical legacy (in Russia). This has left both countries with few natural ideological allies other than each other—and there is little reason to believe this will change in the foreseeable future.

Fifth, Russia and China have made a successful effort to stay on the same side in international disputes. Rather than clash openly over regional issues, such as Vietnam’s territorial and energy policies, China and Russia have discouraged public discussion of their differences, thus minimizing public pressure in each country to stand up to the other. At the same time, each country has trumpeted the threat of the United States and its allies in any dispute that bears on either country. This campaign has been so effective that it was sometimes difficult this year to distinguish between Russian and Chinese writing on the Ukraine crisis or the Hong Kong demonstrations.

Sixth, there are official campaigns under way in both countries to promote national identity. Putin and Xi have used all the resources at their disposal, involving both tight censorship and intense, top-down argumentation, to mobilize their respective countries behind a shrill political narrative that justifies domestic repression and foreign repression. These appeals have been effective because they draw on historic grievances and use familiar chauvinistic rhetoric. The result in both countries has been the most significant spike in nationalism since the height of the Cold War.

China’s rhetoric in support of Putin’s actions in Ukraine and Russia’s rhetoric endorsing Xi’s thinking about East Asia is not a coincidence. Rather, it is a feature of a new, post–Cold War geopolitical order. As long as the current political elites in China and Russia hold on to power, there is no reason to expect a major shift in either country's national identity or in the Sino-Russian relationship. Countries hoping to create a divide between the two—including Japan under Prime Minister Shinzo Abe—are bound to be disappointed. It is no accident, in other words, that the United States has failed to win China’s support against Russian expansionism in Ukraine. Whether the issue is North Korea, Iran, or some other challenge to the West, one should be prepared for more Sino-Russian competition, not less.