Beijing doused its Olympic flame on Sunday night, closing a Games that will be remembered for the extremes of its anti-COVID-19 measures and outrage over the doping scandal that enveloped Russian skater Kamila Valieva.
Chinese President Xi Jinping was on hand for the snowflake-themed ceremony at the Bird's Nest stadium, where International Olympic Committee President Thomas Bach described the Beijing Games as "truly exceptional" before declaring them closed.
The Beijing Games, contained inside a "closed loop", were the second Olympics in six months to be deprived by COVID-19 of much of its festivity.
They were also stalked by politics, with several countries staging a diplomatic boycott over China's human rights record, and the spectre of invasion of Ukraine by Russia, with President Vladimir Putin attending the opening ceremony in a show of solidarity against the West with Xi.
Still, China was spared any embarrassing protests by competitors over its treatment of the Uyghur minority or anything else, and the thousands of foreign journalists on hand were stuck inside the closed-loop, unable to report more widely.
Sunday night's ceremony was capped by a 90-second fireworks display that spelled out "one world, one family," followed by a rendition of "Auld Lang Syne".
During the ceremony, Bach praised Beijing's organisers and made a call for unity as well as universal access to COVID-19 vaccines.
"You embraced each other, even if your countries are divided by conflict," he said. "The unifying power of the Olympic Games is stronger than the forces that want to divide us: you give peace a chance."
SNOWFLAKES AND LANTERNS
Bach was seated next to Xi during the opening ceremony, with space between them.
On one side of the stadium, which was roughly half full, red Chinese lanterns projected a glow as Olympic athletes entered en masse to "Ode to Joy", dancing and taking selfies.
The Chinese team drew cheers that grew louder when San Francisco-born freestyle skier Eileen Gu, who won two golds and a silver for China, was shown on-screen.
Xi and his wife, Peng Liyuan, joined in the applause, and Xi was later shown looking through binoculars at the spectacle of athletes walking across the illuminated LED-screen floor of the vast stadium.
Later, a group of 365 people bade farewell with a glowing green willow twig, enacting a traditional Chinese gesture of regret over parting.
GOLD MEDALS, COVID TESTS
Beijing's tightly sealed bubble prevented the spread of the novel coronavirus at the Olympics or into the community, vindicating a zero-COVID policy that has isolated China inside what are nearly closed borders that shows no sign of easing.
However, many athletes had their Olympic dreams dashed by positive tests that prevented them from competing.
Dozens saw their preparations disrupted by enforced isolation, leading team officials and athletes to demand improved conditions including better food, internet, training equipment and more space.
China's nine gold medals exceeded expectations, putting it in third place, while winter sports powerhouse Norway, with a population of just 5.5 million, won a record 16.
DOPING SCANDAL
While Xi delivered a spectacle for a Chinese public that was unable to attend - tickets were not sold and many connected with the Olympics through the unexpected mania for panda mascot Bing Dwen Dwen - millions of Americans tuned out, with TV viewership reported to be far lower than during the 2018 Pyeongchang Games.
The biggest legacy of the Beijing Olympics will be the controversy surrounding Valieva, who stumbled under pressure in her final skate, and the outrage directed towards Russian sports officials and the country's history of doping, which meant its athletes could not compete under Russia's flag.
Valieva failed a doping test at her national championships in December but the result was only revealed on February 8, a day after she helped the Russian Olympic Committee (ROC) win the team event.
She was nonetheless allowed to participate in the singles but finished fourth, her error-strewn performance prompting a harsh reaction from her coach Eteri Tutberidze that the IOC's Bach later said he found "chilling".
The saga, which dominated the Games, reopened debate over the suitability of the Olympic environment for minors and prompted the world's top anti-doping authority to investigate Valieva's entourage.