It's been seven months since Russian President Vladimir Putin last met with Chinese President Xi Jinping during the Beijing Olympics.

Editor’s Note: Frida Ghitis, (@fridaghitis) a former CNN producer and correspondent, is a world affairs columnist. She is a weekly opinion contributor to CNN, a contributing columnist to The Washington Post and a columnist for World Politics Review. The views expressed in this commentary are her own. View more opinion on CNN.

CNN  — 

The last time Russian President Vladimir Putin met with his Chinese counterpart, Xi Jinping, the future looked very different. Putin was still denying he planned to invade Ukraine, which he did within days of attending the 2022 Winter Olympics in Beijing in February. Xi and Putin stood together, autocracy brothers ready to take on the West. They declared their relationship had “no limits.”

Seven months later, Putin is preparing to again meet Xi, the most powerful world leader still on his side, as the picture has changed dramatically. Both will attend the Shanghai Cooperation Organization’s annual summit in Samarkand, Uzbekistan this week, where they will see each other for the first time since the war started – the first time since their Beijing encounter, a time when Putin apparently expected that his forces would take Kyiv in a matter of days, dealing a painful blow not only to the Ukraine but also to the United States and its allies.

Frida Ghitis

At the time, that outlook was shared by many around the world, including in the US. But the reality turned out quite differently, and now Russians are on the run in parts of Ukraine they had controlled for five months, losing more territory in a few days than they captured – at very high cost – during months of fighting.

The astonishing reversal is a tribute to the determination and bravery of Ukrainian fighters, the inspirational leadership of President Volodymyr Zelensky, skilled, determined and generous support from Washington and the solid, unexpectedly unified response from the West. It’s a formula that has worked far better than anyone expected, and one that must continue as Russia, still entrenched in large sections of Ukraine, seeks to turn the tide.

In Samarkand, Putin will undoubtedly keep up his triumphant, self-assured demeanor – but that will fool no one, certainly not Xi, who must be deeply worried about the astonishing collapse of Russia’s forces in northeast Ukraine.

How much has everything changed? Not only is Russia humiliated, Ukraine exuberant, and the West united, but even China, which still expresses support for the Kremlin, is making statements that embarrass Russia.

Consider that last week, Russia confirmed Xi and Putin would meet on the sidelines of the summit for “very important” talks. China has confirmed Xi’s trip, but its foreign minister on Tuesday declined to confirm a meeting with the Russian president. That meeting will surely occur, but China’s public reticence was another awkward moment for Putin, in a week filled with discomfort and humiliation.

The relationship between Xi and Putin was never one of equals, but now Putin is encountering Xi during one of the most disastrous moments of his unprovoked invasion of Ukraine. He will likely seek more support from Xi, who has been generous with words but much less with deeds.

In February, China echoed Putin’s claim that NATO’s expansion was the issue in Ukraine. And Xi has declared Putin his “best and bosom friend.” Trade between the two countries has grown since the war started and the West imposed sanctions. But China has been reluctant to break the sanctions, or step in to provide a major boost to Russia’s dwindling military supplies. If it had, Putin could have avoided the awkward spectacle of seeking weapons from Iran and North Korea, minor, if aggressive powers.

Putin needs Xi much more than Xi needs Putin, and that imbalance has grown far greater since their last meeting.

Like Xi, Putin has imposed a repressive regime centered on one man – himself. But the Russian president’s suppression of all criticism about the war has taken an expected turn. Those who opposed the “special military operation,” have gone to prison, exile or have mostly fallen silent. But now some of the war’s most vocal supporters are fuming, enraged by the military’s poor performance. (They even call it a “war” – a word that could not previously be uttered without some consequence.)

It’s a dangerous moment for all. A strongman cannot afford to be weak, and Putin knows it.

So, what will Xi do when Putin asks for more support?

For now, there’s no chance that Beijing will discard its unofficial alliance with Moscow, even if Russia is a greatly diminished power. Xi wants to be the leader of a global front opposing the US-led liberal democratic order. To do that, he needs to line up support from nations large and small. And Russia remains an important, nuclear-armed nation.

Also crucial for China, Russia has vast natural resources, including oil and gas. Russia is already greatly expanding its fuel supplies to China as Europe moves to end its dependence on Russia.

Seven months ago, Xi might have relished the notion of Russia quickly crushing West-oriented Ukraine. He might have approved of or at least acquiesced to a plan that would expose divisions within NATO and thus weaken the United States’ clout.

But none of that has happened, and China’s most immediate concern at this moment is the economy. Putin’s war is creating more troubles at the worst possible time.

Next month, China’s Communist Pary will hold its twice-a-decade party congress. Xi, China’s most powerful figure since Mao, is expected to secure an unprecedented third term amid a sharp economic slowdown, made worse by his extreme zero-Covid policy. The possibility of a global recession, heightened by Russia’s gas wars against Europe, would hit export-reliant China very hard.

Get our free weekly newsletter

  • Sign up for CNN Opinion’s new newsletter.
  • Join us on Twitter and Facebook

    In fact, Putin’s war has already gone a long way in making the world rethink its economic reliance on autocracies. That, to put it mildly, is bad news for China.

    It’s highly unlikely Xi will agree to provide a surge of military help to the faltering Russian invasion. Instead, he may try to find a path to end the war in order to ease economic troubles and prevent even more unrest. Russia’s sporadic brandishing of a nuclear threat raises the specter of even more global turmoil which, in addition to creating a global catastrophe, would strike economic growth and Chinese exports, to put it mildly.

    It all adds up to a picture that would have seemed unthinkable when the two leaders, brimming with confidence, met in Beijing back in February. The way the future looks now, they may wish they could turn back the clock.