As Russia wreaks havoc in Ukraine, Moscow has a powerful economic ally to help it resist Western sanctions: China.

Chinese purchases of oil from Russia in December surpassed its purchases from Saudi Arabia. Six days before the military campaign began, Russia announced a yearslong deal to sell 100 million tons of coal to China — a contract worth more than $20 billion. And hours before Russia began bombing Ukraine, China agreed to buy Russian wheat despite concerns about plant diseases.

In a throwback to the 1950s, when Mao Zedong worked closely with Josef Stalin and then Nikita Khrushchev, China is again drawing close to Russia. As the United States and the European Union have become wary of China, Beijing’s leaders have decided that their best geopolitical prospects lie in marrying their vast industrial might with Russia’s formidable natural resources.