The Tokyo Olympics, postponed and played out behind closed doors because of the Covid pandemic, concluded with an upbeat ceremony in Japan's capital.
The Games took place without spectators and athletes were barred from venturing outside the Olympic village.
Their staging has faced local opposition and around 30 protestors jostled with police at the National Stadium before the closing ceremony.
However, other locals have braved heat and warnings to watch events from afar.
Fans took in outdoor events, such as triathlon and BMX, from overpasses and other vantage points despite temperatures that reached 35C, the hottest ever recorded at an Olympics.
The Games' official sign-off, featuring ska bands, football freestylers, breakdancers and BMX riders, created more made-for-TV memories, culminating in athletes thanking the people of Japan by making a heart gesture with their hands.
A scaled-down parade of flagbearers, missing 62 of the competing nations, started proceedings in Tokyo before an air display team painted the French tricolore across the sky in Paris, the host city for 2024.
Tokyo 2020 president Seiko Hashimoto, who appeared at seven Games as a speed skater and then a track cyclist, told the athletes: "There are no words to describe what you have achieved.
"You have accepted what seemed unimaginable, understood what had to be done, and through hard work and perseverance overcome unbelievable challenges."
She added: "This has made you true Olympians."
Athletes had daily swabs to test for coronavirus and wore face masks when not eating, training or competing. After they had finished competing, they had 48 hours to leave the athletes' village.
The Games were postponed a year from their original 2020 date and, as the global pandemic raged, Japanese support wavered, with unfavourable opinion polls in the months before and even the country's Emperor Naruhito expressing concerns about their staging.
The banning of spectators from most venues denied the Japanese public a chance to watch a summer Games close up for the first time since Tokyo 1964 and the climax of an eight-year wait after winning the hosting rights in Buenos Aires in 2013.