Just four days after US President Donald Trump flew out of Beijing, President Vladimir Putin of Russia flew in.
China's relations with the US and Russia are very different of course - one a strategic rival, the other a strategic partner.
But as Beijing continues to play host to a string of world leaders, it serves to anchor China’s dominance in a rapidly shifting world order.
"To the world it shows that Beijing is where it's happening," Aaron Glasserman, postdoctoral fellow at the University of Pennsylvania's Center for the Study of Contemporary China, told RTÉ News.
"And you can't have a major decision about a major conflict, whether it's Iran or Ukraine without consulting Beijing," he added.
But this, for China, is a balancing act, analysts said.
If Beijing senses the global balance of power tipping in its direction, as US hegemony declines, the last thing the Chinese leadership would want to do is disrupt that.
The goal for Beijing, analysts said, is to manage its relationship with the United States so it has the breathing space to fortify itself - even if that’s at the expense of its old friends in the Kremlin.
And that's partly why Mr Putin left Beijing without the major energy infrastructure deal he was gunning for.
"Now that he has Trump in a comfortable place [Xi Jinping] doesn't want to do rock the boat," Mr Glasserman said, "by being too openly supportive of Russia or challenging to America, whether it's in the Middle East, Iran, or with Europe and Ukraine".
"Staying out of the crosshairs of the Trump administration" he added, "is a top priority for Xi Jinping".
On the surface, the two summits - Russian and American - looked strikingly similar.
They both featured a marching honour guard, brass band and chanting children waving flags outside the Great Hall of the People.
But there were marked differences.
For one, the Chinese host, Chairman Xi Jinping, appeared somewhat warmer towards his Russian guest than the American one that had just left.
"My old friend," he called President Putin.
Mr Putin reciprocated, telling his "dear friend," that it felt like three autumns since he last saw him, quoting a Chinese proverb.
Mr Trump also got the red-carpet treatment but there was also a pointed message from the get-go, as we reported here last week.
And that was for the US to stay away from Taiwan.
That was a summit of superpowers, though, that now treat each other - at least with Mr Trump and Mr Xi at the helm - as equals.
China sees Russia, by contrast, as its junior partner, as the new world order takes shape.
With echoes of the "no-limits partnership," forged just weeks before Russia’s full-scale invasion of Ukraine, they agreed to "further extend the China-Russia Treaty of Good-Neighbourliness and Friendly Cooperation".
"The China-Russia comprehensive strategic partnership of coordination for a new era is characterised by full substance, a high level of mutual trust, a solid foundation, and broad prospects," according to the state-controlled newspaper Global Times.
And as if to seal the deal, the friends wasted no time laying into the guy who’d just left the room.
In a joint statement, US foreign and nuclear policy was condemned as "irresponsible". Mr Xi said the Middle East conflict risked tipping the world back into the "law of the jungle".
Warnings against "neo-colonialism" were issued, which sounded like a rallying cry to Global South countries against the US and former European colonial powers.
And there was a promise to defend the UN Charter - although notably no mention of Russia’s invasion of Ukraine, which contravenes it.
"By upholding the international system centred on the United Nations and adhering to the purposes and principles of the UN Charter, China and Russia serve as key forces in opposing hegemony, promoting multipolarity, and stabilising the global situation," said the Chinese read-out.
All the while, a subtle message was being telegraphed to Washington: Russia will not be prised away from China - a notion some US policymakers have entertained.
But for all Mr Putin’s efforts he didn’t walk away with the grand prize he has long coveted - the Power of Siberia II.
That’s a gas pipeline stretching some 2600km from Russia’s Arctic coast to China’s Eastern City of Shanghai.
Russia’s dependence on China to prop up its wartime economy in the face of western sanctions is evident.
In return, China would certainly like more cheap Russian gas. But it has spent the past few years diversifying its energy sources to reduce reliance on any single supplier or global maritime chokepoint.
In fact, following Mr Trump’s visit, tankers carrying American liquefied natural gas set off from Louisiana to China, signalling a resumption of energy imports cut off during last year’s tariff war.
China does want greater access to the Russian Arctic however - a key strategic presence in the High North that gains value as the polar ice caps melt.
The joint declaration mentioned their deepening cooperation there and castigated the US and its allies over "the growing militarisation of high latitudes".
The Arctic should be preserved as "a territory of peace, stability and low military-political tension," it read.
Russia, China and NATO countries have all increased military activity in the region in recent years.
Donald Trump, infamously, has toyed with the idea of seizing Greenland, a European territory, citing national security concerns.
Russia once jealously guarded its Arctic access from China but has been forced to open it up as a price to pay for China’s support.
Now that the Americans and Russians have left town, Mr Xi may be planning a trip to see North Korea’s Supreme Leader Kim Jong-Un, according to South Korean media reports.
Like China and Iran, North Korea has been supporting Russia’s assault on Ukraine through technical and logistical support.
North Korea also dispatched tens of thousands of soldiers to the front, earning the internationally sanctioned regime around $13 billion, according to analysis by South Korean defence agencies.
This alignment of autocracies comprising China, Russia, North Korea and Iran has been dubbed by some analysts the "axis of upheaval".
"CRINK" is another popular acronym in foreign policy circles, standing for China, Russia, Iran and North Korea.
Writing in Foreign Affairs magazine back in 2024, foreign policy analysts Andrea Kendall-Taylor and Richard Fontaine argued that deepening cooperation between these four countries would disrupt and create alternatives to the Western-led international order.
The blunting of international sanctions on Iran and North Korea provides a case in point.
Experts debate the strength and cohesion of the grouping beyond a loose coalition, bound together more by anti-west sentiment than strategic unity.
At least for now, there’s little comparison to be drawn with western alliances like NATO, according to Mr Glasserman of the University of Pennsylvania.
China's grand strategy, he said, is all about making itself integral and central to the global economic system.
"If you want to put it on an axis of chaos, you also have to put it on a bunch of other axes too, because it is very deeply embedded with many other groups of countries," he said.
As Mr Xi continues his whirlwind of international diplomacy, perhaps he aims to keep his friends close, with a view to keeping his enemies closer.