Days before the Beijing Olympic opening ceremony last year, China's Xi Jinping and Russia's Vladimir Putin inaugurated their "unlimited partnership." Three weeks later, the Olympics past, Putin's army invaded Ukraine.

Ukrainian President Volodymyr Zelensky, the victim of aggression, has naturally been scathing in his condemnation of Putin. Yet he has been pointedly open to dealing with Putin's "partner without limits," Xi Jinping.

Zelensky, as so often, is showing prescient sensitivity, in his delicate handling of China, to the painful geopolitical circumstances his nation confronts.

Ukraine's President Volodymyr Zelenskyy speaks at a press conference in the Ukrainian capital of Kyiv on March 31, 2023. (Kyodo) ==Kyodo

China lies far across the Eurasian continent from Ukraine. Yet Beijing has arguably greater ability to shape the future of that war-ravaged country than any other nation, except possibly for the United States.

Should China side decisively with its "unlimited partner" in Moscow, Beijing could provide volumes of ammunition, weaponry, and economic assistance that would at a minimum greatly prolong the war, and could decisively tip the scales of conflict against an increasingly exhausted NATO and its allies.

Conversely, should China refrain from deeper support for Russia, and even cut back its massive purchases of Russian oil and gas, Beijing could constrain Russia's ability to continue fighting, as Western arms shipments and financial support conversely brighten Ukraine's prospects of outright victory.

Kent Calder. (Kyodo)

When the current conflict ends, China's shadow could also loom large in Kyiv, as it did before the war began. China has since 2019 been Ukraine's largest trading partner -- a special customer for Ukrainian corn, wheat, sunflower oil, and technology, both civilian and military.

Even China's first aircraft carrier, christened in 2012 as the Liaoning, was built in a Mikolayev shipyard, before being sold to China in 1998 and re-conditioned. Technical cooperation ranging from jet engines and naval armaments to space systems has been substantial between China and Ukraine over the years.

During the Cold War, especially after the Soviet invasion of Hungary in 1956, China systematically built diplomatic relationships with Eastern Europe, in an effort to divert the Soviet military from facing east. Yugoslavia, Albania, Romania and Hungary were special beneficiaries of this tacit Chinese support.

Yet the whole of Eastern Europe benefitted, and drew closer to China, even as Sino-Soviet relations sharply deteriorated over the three decades from the early 1960s through the 1980s.

Following the Cold War, virtually all of these former Warsaw Pact nations, together with the Baltic portions of the Soviet Union itself, joined NATO, but retained friendly ties with China.

Indeed, since 2012 Chinese leaders have typically met annually in a continuing summit series with Central and Eastern European leaders (currently 14 European states plus China), while receiving major Belt and Road funding.

China has thus wooed Eastern Europe for decades, to balance first Soviet and then Russian power. And Ukraine holds major additional attractions for Beijing as well.

It is, after all, Europe's second largest nation, following only Russia. It is rich in foodstuffs like wheat and corn, much needed in the world's most populous nation, and raw materials like coal as well.

More importantly, of late Ukraine has grown immensely sophisticated in technology, with that sophistication, ranging from engine components and telecommunications to cyber-security, enhanced greatly by the painful experience of war.

Ukraine's geopolitical positioning, and its prospective role in the future European order, are also matters of importance for China -- as they are also for Russia, but for contrasting reasons.

Ukraine, after all, extends over 1300 kilometers from west to east -- from the heart of Europe to locations east of Moscow, with Kharkiv lying less than 750 km southwest of Russia's capital itself.

With a powerful, battle-tested military, armed with sophisticated NATO-standard weaponry, Ukraine could well end the current war with one of the strongest defense capabilities on the continent.

That could make it a check on Russian ambitions, useful for China in the east as a lever to extract optimal terms from Moscow, as well as a tool for shaping Europe's stance toward China.

Wartime reconstruction costs in Ukraine were estimated recently by the World Bank and the United Nations at well over $400 billion, a figure that will inevitably rise as the war grinds on.

China, with the largest foreign exchange reserves in the world, and considerable construction capability, could be a crucial supplier of Ukrainian reconstruction support. Its role in Ukrainian reconstruction could well increase Beijing's influence still further, both in Ukraine and in Europe more generally.

No doubt China does not want Russia to collapse in the current conflict. Yet it is far from clear that Beijing actually wants the Russians to win.

Indeed, Xi's seemingly cautious response to Putin's entreaties at the recent Moscow summit suggests that Beijing has rather different calculations.

Chinese President Xi Jinping delivers a speech at the closing ceremony of the National People's Congress at the Great Hall of the People in Beijing on March 13, 2023. (Kyodo) ==Kyodo

Those could well lead to a complex, dangerous world in which China holds the balance of power among Russia, Ukraine, and even much of Europe as well.

Japanese Prime Minister Fumio Kishida's recent visit to Kyiv, and the forthcoming Hiroshima G-7 summit, are important in this context.

China shows prospects of appearing as a more active and powerful balancer in the Ukraine conflict, and in Eastern Europe generally, rather than as a categorical ally of Russia.

Precisely for that reason, Japan is needed, by both Europe and Ukraine, not to mention the United States, as an alternate force.

There are sectors, such as support for reviving Ukraine's seriously damaged energy grid, and financial support for industrial revival, through the IMF and elsewhere, where Japanese support can be decisively important. And such support would also dilute dangerous over-dependence on China.

Kyiv may be far across the Eurasian continent. Yet due to Putin's nuclear threats, China's rising influence over Eurasian policy outcomes, and Japan's central G-7 role at Hiroshima next month, this is the time for Tokyo to forcefully focus westward.

Developments there, although far away, will shape Japan's own future as well.

(Kent E. Calder is the director of the Edwin O. Reischauer Center for East Asian Studies at the Johns Hopkins School of Advanced International Studies in Washington.)