Although not without its problems, most notably the absence of fans from venues in the Japanese capital, coronavirus has been a merciful sideshow to displays of sporting greatness.
Everyone involved will keep their fingers firmly crossed that the Olympics in three years' time will be able to be held in normal circumstances.
Paris had to stage its show remotely, but it was a memorable spectacle, with La Marseillaise played by musicians across Paris and beyond, including French astronaut Thomas Pesquet in the International Space Station.
French athletes who had starred in Tokyo but were now back home were among those gathered in the Trocadero to watch, although plans to use the Eiffel Tower as a flag pole for the world's largest flag were scuppered by the weather.
Leeds Festival road closures: Aberford village will be closed to festival traffic after being used as a 'rat run'
Man dead after a paragliding accident near to Leeds
'Highly organised' Leeds thieves caught by own technology after tracking movement of business owners
Leeds United supporters issued warning not to walk on M621 after minibus drops fans off on motorway slip road
Leeds drug farmer locked up after being handed 'lenient' sentence
Back in Tokyo, the formalities were completed as the Olympic flame went out, with Seiko Hashimoto, president of the organising committee, saying: "The hope that has been ignited here can never be extinguished."
International Olympic Committee president Thomas Bach paid tribute to the athletes, saying: "Over the last 16 days you have amazed us with your sporting achievements, your excellence, your joy, your tears.
"You created the magic of these Olympic Games Tokyo 2020.
"You were faster, you went higher, you were stronger, because we all stood together in solidarity.
"This is a powerful message of solidarity and peace. You inspired us with this unifying power of sport. This is even more remarkable given the many challenges you had to face. In these difficult times, you gave to the world the most precious of things - hope.
"For the first time since the pandemic began, the entire world came together.
"This gives us hope, this gives us faith in the future. The Olympic Games Tokyo 2020 are the Olympic Games of hope, solidarity and peace."
Bach also reserved praise for the hosts, who shouldered the costs and the difficulties without being able to enjoy most of the benefits.
He said: "You, the best athletes of the world, could only make your Olympic dream come true because Japan prepared the stage for you to shine.
"You, the Japanese people, can be extremely proud of what you have achieved. On behalf of all the athletes, we say thank you Tokyo, thank you Japan.
"These were unprecedented Games. It took us, the IOC and our Japanese partners and friends an equally unprecedented effort to make them happen.
"Our deep gratitude goes to the Japanese organising committee."
Laura Kenny had earlier led the British delegation of athletes still in Tokyo into the stadium, carrying the flag after becoming the first British woman to win gold medals at three successive Olympic Games.
The ceremony ended with a spectacular fireworks display and a look ahead to the Paralympics, which begin in Tokyo on August 24.