RIO DE JANEIRO - As the curtain fell on the first Olympics in South America on Sunday night in Brazil, the Rio edition will be remembered as the Games of many firsts.
A total of nine countries - Vietnam, Kosovo, Fiji, Puerto Rico, Bahrain, Jordan, Tajikistan, Cote d'Ivoire and Singapore - won their maiden Olympic gold medals while trap shooter Fehaid Aldeehani captured the first gold for the Independent Team.
It was also the first time the International Olympic Committee invited a refugee team to compete alongside the 206 National Olympic Committees. The 10-man team had athletes from Syria, Ethiopia, South Sudan and the Democratic Republic of the Congo.
Notwithstanding these breakthroughs, the XXXI Olympiad had its controversies as the host, plagued by a slumping economy and political instability, had to contend with a plethora of issues like infrastructure, the Zika virus, water pollution and safety.
Most of these concerns were addressed or overblown and while there were several cases of theft and armed robbery involving athletes and officials, the 306 events across 28 sports during the 17-day competition ran without any major disruption or security incident.
Initial public apathy from the Brazilians - empty seats were a recurring feature at some venues - eventually gave way to greater enthusiasm as Brazil began winning medals. It reached a climax at a sold-out Maracana Stadium on Saturday (Aug 20) when Neymar and Co. delivered a historic gold medal in football, the country's first in the event after six decades of failed attempts.
A massive storm in Rio during the closing ceremony forced many in the Maracana to don ponchos but did little to ruin the festive mood as the athletes marched in together - national sailor Griselda Khng was Singapore's flag-bearer and led in the country's 11-man contingent - and joined spectators for the three-hour show that included the official flag handover ceremony to the Tokyo 2020 delegation.
The closing ceremony featured music and dance performances of Brazilian heritage, elaborate costumes and light shows, and closed with a carnival-themed parade followed by a massive fireworks display.
It also featured an appearance by Japanese Prime Minister Shinzo Abe, who emerged from a green pipe dressed as video game character Super Mario. Japan's capital of Tokyo will host the next Olympic Games in 2020.
There was much to cheer for Brazilian sport, which recorded its best gold and overall medal haul of seven gold, six silver and six bronze to finish 13th in the standings.
The United States, despite having to weather the self-inflicted embarrassment caused by swimmer Ryan Lochte and his false claims about being robbed at gunpoint in Rio, topped the table with 46 golds, ahead of Britain (27) and China (26).
Russia, whose entire athletics team were banned due to doping allegations, participated under a cloud of suspicion from other teams and finished fourth with 19 golds.
Japan, Olympic hosts in four years, were sixth with 12 golds while their 41 medals was a record and cause for optimism ahead of the 2020 edition.
The Rio Games were a step in the right direction for South-east Asia, whose combined 18 medals (five golds, 10 silvers, three bronzes) was a new all-time mark for golds and total medals.
Singapore swimmer Joseph Schooling's sensational victory in the 100m butterfly, beating 23-time Olympic champion Michael Phelps, was a major highlight for both the Republic and the region.
This was the final Olympic outing for Phelps, the American legend, and his counterpart on the track Usain Bolt, signalling the end of an era for two of the greatest athletes of this or any generation.
But Rio was also the site for a new wave of young stars to introduce themselves to a global audience; estimated at 3.5 billion. The likes of Simone Biles (gymnast), Kosuke Hagino, Adam Peaty (swimming), Andre de Grasse, Wayde van Niekerk and Elaine Thompson (athletics) all showed that the future of the Olympics is in safe hands as the Olympic flame was extinguished and the sporting world bade farewell to Rio and the continent.