The 2022 Beijing Winter Games went way over budget — putting in high-speed trains and creating a wintry environment in the arid hills outside China’s capital doesn’t come cheap. But the real cost is a miscalculation that has set back Beijing’s desire to balance politics and trade and operate in a stable international environment.

Chinese President Xi Jinping is known for being crafty and cunning, but he may have met his match in neighboring strongman Vladimir Putin, who invited him up onto the roof of cozy Russia-China ties during their Feb. 4, 2022 meeting in Beijing only to later pull away the ladder.

China’s paramount leader is obsessed with maintaining face, so it’s unlikely for him to retreat from an error of judgment, much akin to Donald Trump and other egotistical leaders. Like Trump, Xi is very good at putting on a show, the truth content is only of secondary importance, and he’s very good at pulling out all the stops to make sure the show goes on.

Xi’s most recent spectacle, the Beijing Olympics, was pulled off almost without a hitch despite the strong headwinds of diplomatic boycotts, damaging revelations about human rights abuses and a paucity of natural snow. But pull it off he did, giving his propaganda organs a field day of self-congratulatory good cheer. And he pulled off a diplomatic coup in convincing Russian President Putin to attend the opening ceremony, the lone statesman of any stature to do so.

But was it a win-win situation?

Looking at it in the short-term (short-term here being the duration of the Olympics), Putin’s visit alleviated Beijing’s concern with saving face in the wake of the diplomatic boycott of Western leaders. And since putting on a show for foreigners is not without its domestic component, Xi showed the Chinese people he still had the “right stuff,” which is to say, the mandate. That was his coup, and it paid immediate public relations dividends.

But at what cost?

At the Feb. 4 Diaoyutai State Guest House meeting between Putin and Xi, the two “friends” exchanged confidences and produced a 5,000-word statement shoring up China’s support for Russia and Russia’s support for China — couched in anti-American terms meant to last for decades to come.

It is a fact that Putin invaded Ukraine shortly after his consultation with Xi. Yet there is still much debate about how much detail Putin shared on his plans for Ukraine raising a key question.

What did Xi know and when did he know it?

It has been reported that they spoke of NATO and shared certain anti-American views, but it is not known how much the poker-faced Putin, who likes to keep his cards close to his chest, revealed about his plans to invade Ukraine and decapitate the Kiev government.

It may be supposed that some military activity was at least hinted at, perhaps in the Donbass region where frictions have simmered for years.

The U.S. had already privately briefed China on Russia’s ominous buildup of troops and then gone public with claims that Putin was preparing to invade. But it’s unknown if the former KGB spy broached ((to Chinese leaders)) his intention to destroy the Kiev government and to “demilitarize” and “denazify” Ukraine at gunpoint, the so-called justifications Russia cited to explain its actions.

While Putin’s anti-NATO riff was quickly picked up, amplified and repeated by China’s state press, talk of invasion was dismissed cavalierly as U.S. propaganda. Even when the invasion became a fact for all to see, China’s Foreign Ministry engaged in sophistry to avoid describing it as such.

One cannot help but note that Putin’s declaration of military action was precisely timed to begin the day after the closing ceremony of the Beijing Olympics. Xi cared enough about the Games that Putin’s “restraint” can be evaluated as a way of showing respect.

Even if Xi is given the benefit of doubt of not knowing the particulars about the planned invasion, he cannot be excused for doubling down his show of support for Putin after the multifaceted attack began. Yet, the official Chinese readout of the Putin-Xi phone call of Feb. 25 suggests he is doing just that. As for China’s decision to abstain from criticizing Russia at the Security Council, it’s a hedge, a teacup with leaves that invite reading.

Trump infamously fell for the Rasputin-like charm of Putin, and he fell hard, so much so that even after the stealthy invasion had begun, provoking worldwide outrage, he described the strongman as a “genius.”

Even Japan’s former prime minister, Shinzo Abe, an old-school nationalist and known ideological opponent of communism, found Putin persuasive enough over the years to enhance ties and boost trade between the two countries. Abe held 27 meetings with Putin and the two were on a first name basis, ostensibly in the hopes of paving a road to the eventual recovery of the disputed Northern Territories.

Seeing Putin’s cold-blooded penchant to recover “lost territory” on the edge of Europe, an act of aggression that is unfolding in real time, it is unlikely a deal would ever have been made on the Kurils, but Putin has that kind of persuasive charm.

Prime Minister Fumio Kishida’s experience as foreign minister during the Crimea crisis has served him well, and he quickly joined the U.S.-led international outcry against Putin’s declaration of war, including tough sanctions.

To Abe’s credit, he has reluctantly corrected course, stating that Russia’s invasion was an “unforgivable act.” His former adviser, Taniguchi Tomohiko, did not mince words, either, “Japan should never take an ambiguous attitude about nonnegotiable principles.”

So what about Xi? Was he caught flat-footed by Putin’s deceptive charm or is he a co-conspirator? Or perhaps an unwitting co-conspirator? Was he played?

With the politically weighty “Two Meetings” scheduled to open in Beijing next week, China’s autocratic leader is facing domestic headwinds as well. No one is expecting Xi’s rivals and doubters in the party to openly oppose him, but they might succeed in hemming him in a little bit, and that could have long-term consequences.

Philip J. Cunningham is a freelance writer on East Asian politics, and author of “Tiananmen Moon” and “Tokyo Crush.”