The US and China ended the games with 40 gold medals each, but the US topped the table because it had more silver medals.
Hollywood star Tom Cruise abseiled from the roof of the Stade de France drawing gasps from spectators as Paris bade farewell to an Olympics hailed as one of the most successful.
Cruise descended on a wire in front of 71,500 people, grabbed the Olympic flag and jumped on a motorbike, to the delight of athletes and fans.
In a preview of what the world can expect when the next event is held in Los Angeles in 2028, the 62-year-old Mission Impossible star was then shown on a screen boarding a plane and skydiving into the Californian city before adorning the iconic Hollywood sign with the Olympic rings.
Los Angeles band Red Hot Chili Peppers, singer Billie Eilish and rappers Snoop Dogg and Dr Dre then performed a mini-concert on an LA beach framed by the Pacific Ocean.
The closing spectacle marked the beginning of the four-year countdown to the LA Games, and American gymnastics icon Simone Biles joined Los Angeles Mayor Karen Bass as the Olympic flag was formally handed over.
Earlier, International Olympic Committee president Thomas Bach described the Paris Games as “sport at its best”.
“These were sensational Olympic Games from start to finish,” Bach said. “Or dare I say: Seine-sational Games,” the IOC chief quipped about the Seine River where the opening ceremony unfolded and the triathlon and marathon swimming events took place.
At what will be Bach’s last games after announcing his intention to step down next year, the IOC chief also called for ”a culture of peace” in a war-torn world.
“We know that the Olympic Games cannot create peace, but the Olympic Games can create a culture of peace that inspires the world,” he said. “Let us live this culture of peace every single day.”
‘Magic’
About 9,000 athletes danced and sang the night away during the closing ceremony, which was billed as a celebration of humanity and the unifying power of sport.
“We knew you would be brilliant, but you were magic,” Paris 2024 organising chief Tony Estanguet told athletes. “You made us happy, you made us feel alive – the world needed this moment so much.”
The ceremony began with Leon Marchand, who won four gold medals in swimming for France, collecting the Olympic flame from the cauldron in the Tuileries Gardens to begin its journey to the stadium.
Reappearing later in the stadium to chants of “Léon, Léon”, Marchand blew out the flame.
The ceremony followed 17 days of frequently breathtaking sporting action set against the backdrop of iconic Parisian landmarks from the Eiffel Tower to the Chateau de Versailles.
In contrast to the rain-soaked opening ceremony, Sunday’s celebration in the national stadium began as a golden sunset bathed the French capital.
China and the United States battled for the top spot up until the final day when the US women’s basketball team squeezed past France 67-66 to clinch the last gold of Paris 2024.
The win, the eighth consecutive Olympic women’s basketball title for the US, gave the country its fourth gold, the same as China. The US topped the medal table, however, because it had more silver and medals.
In a news conference on Sunday, Zhou Jinqiang, the vice chief of the Chinese delegation, praised the country’s athletes for their “record-breaking performance” as they took home a total of 91 medals.
“This marks the best result for China in the Olympic Games held overseas since it began participating in the Summer Olympics in 1984,” Zhou said. China won 100 medals and topped the table with the most golds when it hosted the games in Beijing in 2008.
Japan, which hosted the last Olympics in 2020, also celebrated its best-ever showing at an overseas games, coming in third with 20 golds.