Swim legend Phelps took his unmatched career haul to 23 gold medals with another five in Rio — plus a silver, after his loss to former childhood fan Joseph Schooling.

Brazil came late to the party but the country celebrated long and loud when Neymar won a gold-medal penalty shoot-out against Germany to erase memories of their 7-1 World Cup semi-final humiliation in 2014.

– ‘Sporting superpowers’ –

On a sodden final day, Kenya’s Eliud Kipchoge, 31, shone with his seventh win in eight marathons, timing 2hr 8min 44sec to win by more than a minute.

But there was also controversy as Mongolia’s Chagnaadorj Usukhbayar became the sixth weightlifter in Rio to fail a drugs test.

And police seized passports, phones and computers in a raid on the Irish Olympic office, following the arrest of Irish International Olympic Committee member Patrick Hickey over an alleged black market tickets scam.

Brazil added a final flourish as they beat Italy 3-0 to win the men’s title in volleyball, one of the country’s most popular sports.

French fighter Tony Yoka won a split-decision against Britain’s Joe Joyce to take the super-heavyweight title in boxing.

Switzerland’s world champion Nino Schurter, third in Beijing and second in London, competed his ascent of the podium by winning the men’s mountain bike competition.

And there were furious scenes when a Mongolian coach stripped down to his underwear to protest a decision against wrestler Ganzorig Mandakhnaran. AFP