Tokyo handed the Olympic flag over to Paris as organisers breathed a sigh of relief at the end of the strangest Games in living memory.
Modern pentathlete Natalya Coyle was the Irish flag bearer for the closing ceremony.
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.
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.
"You, the best athletes of the world, could only make your Olympic dream come true because Japan prepared the stage for you to shine," he said.
"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."
The ceremony ended with a spectacular fireworks display and a look ahead to the Paralympics, which begin in Tokyo on August 24.