On Saturday, Russia staged a grand celebration in Moscow to commemorate the 70th anniversary of the country’s defeat Nazi Germany in World War Two. The occasion—which featured a military procession through Red Square—did not include the leaders of the United States, France, and the United Kingdom, who declined to attend out of protest of Russia’s interference in Ukraine. But of the 30 or so world leaders who did arrive, only one had the privilege of sitting beside Russian leader Vladimir Putin: Chinese president Xi Jinping.

As Russia’s relationship with the United States and its European allies grows worse, its ties to China have never been closer. On the eve of the parade last Friday, the two countries announced 32 separate bilateral agreements, including a non-aggression pledge in cyber warfare. The deals complement a $400 billion deal made last May, when Russia agreed to ship 38 billion cubic meters of natural gas each year between 2018 and 2048 to China. And next week, Russian and Chinese naval vessels will conduct live drills in the eastern Mediterranean Sea.

In remarks published last week in Xinhua, China’s official news service, Xi Jinping ascribed the closeness between China and Russia to the their shared sacrifice in World War Two. “Decades ago, the Chinese and Russian nations shared weal and woe and forged an unbreakable war friendship with fresh blood,” he said. But in the seven decades since the war, relations between the two haven’t always been warm—when they existed at all. Ideological and geographical disputes triggered a Sino-Soviet split in 1960, and over the next three decades the two countries had a more adversarial relationship with each other than either had with the United States. This division was the primary geopolitical rationale behind Richard Nixon’s decision to re-engage China in 1972.By the late 1980s, Sino-Russian relations began to thaw, and in 2001 the two countries cemented ties through a landmark “friendship agreement.”

Despite many differences and possible points of contention, China and Russia are united by a major strategic interest: disrupting the United States. Beijing and Moscow have found common cause on the United Nations Security Council, where they have repeatedly blocked U.S.-led foreign policy initiatives. And when Washington and its European allies slapped sanctions on Russia’s economy after Moscow’s forcible annexation of Crimea, Beijing remained neutral—despite non-interference being the bedrock principle of Chinese foreign policy.

Both Russia and China have sought to challenge American hegemony by creating new multilateral institutions. The Moscow-led Eurasian Economic Union links together Russia, Armenia, Kazakhstan and Belarus, economies with a combined GDP of more than $4 trillion. Meanwhile, the Asian Infrastructure Investment Bank, headquartered in Beijing, has snapped up 57 members since its formation last year, including countries like the United Kingdom that joined over American objections. Major Chinese initiatives like the New Silk Road Economic Belt and 21st Century Maritime Silk Road—referred together as “One Road, One Belt”—will feature road, rail, port, and pipeline investment across 65 countries in Asia, Africa, the Middle East, and Europe with a combined population of 4.4 billion. In the United States, meanwhile, President Obama has struggled to persuade Congress to pass the far less ambitious Trans-Pacific Partnership.

Geopolitical analysts have argued that the Sino-Russian friendship is unequal, and that Moscow needs Beijing far more than Beijing needs Moscow. China’s close ties with energy-rich nations like Kazakhstan and Turkmenistan, once joined with Russia in the Soviet Union, gives it leverage in negotiating energy deals. Despite the bonhomie generated by Xi’s visit to Russia, the two sides failed to agree on a price for a new pipeline linking Western Siberia to China. Yet these details are unlikely to spark a rupture in ties.

“We are strong if united but weak if isolated,” Xi Jinping told Xinhua.