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.”