The world trooped cautiously into the 2022 Beijing Olympics, wary about the "closed loop", a diplomatic boycott, human rights and the silencing of athletes.
But after two weeks of action-packed sport, passion, triumph and human endeavour, the closed loop gave way to an "open China", as more global viewers than ever before soaked up the tension, drama and emotions that encapsulate the Olympic spirit in a Games that appeared to have fulfilled its motto of "Together for a Shared Future".
The Winter Olympics family may have been sealed off from the rest of the world because of strict Covid-19 rules, but the world nevertheless had a front-seat view, via television and online platforms, of a China that has rapidly moved on from its coming out party at the 2008 Summer Games to a modern, world-class, technologically advanced super power that can create robots to deliver meals to your hotel room door.
From the spectacular, laser-lit opening ceremony that welcomed the world with an environmentally friendly, barely visible Olympic flame on Feb 4, to an equally colourful but more relaxed closing ceremony on Sunday, Beijing — the only city to host the Summer and Winter Olympics — has conjured up a memorable Games in which Chinese athletes achieved unprecedented success on the ice and snow.
President Xi Jinping attend both ceremonies, clearly satisfied his pet project from almost a decade ago came to a successful end and helped to enhance China's global standing.
Before IOC President Thomas Bach closed the Games, he struck a political tone rare for an Olympic closing ceremony, with undercurrents of the diplomatic boycott, tensions between Russia and Ukraine and the imbalance of access to Covid-19 vaccines around the world.
Hailing the "extraordinary" Games and athletes, Bach said: "Your unifying power of these Olympic Games is stronger than the forces that want to divide us. Give peace a chance. May the political leaders around the world be inspired by your example of solidarity and peace."
Referring to the Olympic motto of "Faster, Higher, Stronger, Together", Bach added: "If we want to finally overcome this pandemic, we must be faster, we must aim higher, we must be stronger and we must stand together.
"In this Olympic spirit of solidarity, we call on the international community to give equal access to vaccines to everybody around the world."
With that, the Olympic flame was lowered and extinguished before fireworks lit up the sky. As the spectacle came to a close what was left was memories of an incredible two weeks of top-class sport.
Freestyle skier Eileen Gu, seen waving to the camera on Sunday (Feb 20), and snowboard phenom Su Yiming brought Generation Z savvy to the Chinese squad, rendering the traditional premise of staid, assembly-line mainland athletes obsolete. Beloved figure skating golden couple Sui Wenjing and Han Cong, meanwhile, showed that romance is alive in Chinese sport.
China's record nine gold medals eclipsed the eight won by established Winter Games powers the United States, the country's chief political rival who led a posse of Western nations in a diplomatic boycott of the Games over Beijing's alleged human rights abuses in Xinjiang. It dominated headlines before the Games but was quickly forgotten once the spotlight fell on the athletes.
Hong Kong's record three-strong squad of speed skater Sidney Chu and skiers Audrey King and Adrian Yung may have only been there to make up the numbers, but their very presence has helped to raise awareness of winter sports in the city with the promise of more development programmes and co-operation with their mainland counterparts.
The doping drama involving 15-year-old Russian figure skater Kamila Valieva, which ended in the teen failing in the individual events, hung heavy over Beijing, though it failed to completely dilute Beijing's feel-good factor. Rather, it only served to refocus attention on the dark side of Russian sport, with Bach shocked at the "chilling" reaction Valieva received from her coaches after she fell twice in the free skate programme.
Bach's words would find favour with at least one US athlete, three-time Olympian Aaron Blunck, who said his Twitter account was suspended because he praised the organisers and accused Western media of bias.
Unlike the opening when teams marched in one by one, the athletes were pretty much let loose inside the 'Bird's Nest' National Stadium on Sunday, waving flags, taking selfies and even abandoning social-distancing rules to dance in circles and mingle freely.
After moving videos paying tribute to athletes, volunteers and the human spirit, a digitally created symbolic breaking of a twig was Beijing's way of saying farewell.
After the playing of the Italian national anthem, Beijing mayor Chen Jining gave the Olympic flag to Bach, who passed it on to Milan mayor Giuseppe Sala and Cortina mayor Gianpietro Ghedina.
Norway, as expected finished top of the medals table with 37 in total, of which 16 were gold. Germany were second on 12 golds (27 total), while China finished third with nine gold medals out of 15. The US were one gold behind China on eight but with 25 medals in total including 10 silvers. Japan won three more medals than China in total, but only had three golds.
Gu, the San Francisco-born part-time model who has caused a storm for switching her allegiance to China from the US, won two golds and a silver while former child actor Su lit up the men's snowboard competition with silver and gold.
Aerial duo Xu Mengtao and Qi Guangpu soared higher than their rivals while Gao Tingyu earned a stunning speedskating 500m gold in an Olympic record time. Other mainland golds went to the short-track speedskating mixed relay team and Ren Ziwei in the men's 1,000m event.
Though Beijing may trumpet the Games' success, many activists are not buying it. For them, the smiles, backslapping and soulful ceremonies failed to gloss over what they considered serious questions about China's regard for human rights.
Before the Games, groups such as Global Athlete reluctantly urged competitors to refrain from making political statements or conducting any sort of protests during the Games. Not so much because of the IOC's Rule 50 that governs athletes' conduct on the Olympic stage but China's own national laws that restrict freedom of expression and could result in punishment.
Some countries even provided their delegations with burner phones over fears their personal mobile devices could be hacked and put them under surveillance.
While online users flooded social media platforms with comments about Gu, US skier Mikaela Shiffrin and Valieva, activists spent the past few weeks in continued attacks on the IOC for awarding Beijing the Games. Valieva's plight, in which she tested positive for a banned substance in December but was allowed to continue competing in Beijing, offered fuel to rights groups alarmed by the IOC's apparent lack of regard for the mental health of child athletes.
The IOC, though, probably breathed a sigh of relief that the Valieva saga was as controversial as it got during the Games. The closed loop did its job and reportedly kept the coronavirus from leaking out to the rest of the Chinese population, the sport was of the highest quality and any bad feelings were only aired on social media, where one of the main contentions was US-China allegiance.
Questions were raised over whether Gu gave up her US passport to represent China at the Games, while California-born figure skater Zhu Yi was vilified online because she fell during the mixed team event, denying the host nation a gold.
US-born figure skating gold medallist Nathan Chen, meanwhile, was attacked online for "humiliating China" by flying the American colours. In contrast, Japan's figure skating defending champion Yuzuru Hanyu, suffering from an injury and unable to challenge for medals, was showered with love and sympathy by his millions of Chinese fans.
The Beijing Games also bid farewell to a Winter Olympics legend with US veteran snowboarder and three-time gold medallist Shaun White ending his campaign without a medal.
Another American, women's downhill skier Mikaela Shiffrin, was heavily favoured to add to her two gold medals but left the slopes empty-handed.
This article was first published in South China Morning Post.