For Xi Jinping, a leader who aspires to place China at the centre of world affairs,
it was a triumphant week of diplomacy.
Just four days after Donald Trump concluded a visit to Beijing,
looking for business deals and help with Iran,
Vladimir Putin turned up, seeking assistance for his war in Ukraine.
Russia's president, like America's, lavished praise on his host and left with a clutch of agreements.
But like Mr Trump's, the deals were short on detail.
And the enduring image at home and abroad was one of China as the fulcrum of global geopolitics,
dealing with America as an equal and Russia as a junior partner.
China had not originally planned for the visits to be so close:
Mr Trump's was scheduled for early April but delayed by the war in the Gulf.
Still, the timing worked well for Mr Xi.
It sent a clear message that better relations between China and America
will not come at the expense of his "no limits" partnership with Mr Putin.
At the same time, Mr Xi showed the leverage that he has gained over Russia
since its full-scale invasion of Ukraine in 2022.
Despite talk of shared interests, Mr Putin ended his two-day visit on May 20th
without a long-discussed deal on the building of another gas pipeline between Russia and China.
Mr Putin's visit was not as elaborate as Mr Trump's.
China greeted the Kremlin's leader in the same way,