After more than two weeks of intense competition, a closing ceremony has heralded the end of the Rio 2016 Olympic Games.
The legendary Maracana Stadium was awash with colour as Brazil handed over the baton to Tokyo.
The final event kicked off with figures dressed as multi-coloured macaws flying over Rio's world-famous landmarks, Christ the Redeemer and Sugarloaf Mountain, before forming the five Olympic rings.
Nostalgic notes from the traditional music of Rio's neighbourhoods and a representation of 1930s icon Carmen Miranda set the stage for the entry of hundreds of the 11,000 athletes who came to Rio and the last medal ceremony, for the men's marathon run early in the day.

Brazilian singer Roberta Sa performs during the closing ceremony of the Rio 2016 Olympic Games at the Maracana stadium in Rio de Janeiro.
The city handed over the Olympic flag to Tokyo, site of the 2020 Summer Games, and extinguished the Olympic flame, burning since Aug. 5 in a small, environmentally friendly cauldron.
Japanese Prime Minister Shinzo Abe and the new mayor of Tokyo, Yuriko Koike, attended.
Rowing gold medallist Kim Brennan says she is grateful for the honour of carrying the Australian flag at the closing ceremony.

Tokyo's governor Yuriko Koike waves the Olympic flag during the closing ceremony of the Rio 2016 Olympic Games at the Maracana stadium in Rio de Janeiro.

Athletes parade during the closing ceremony of the Rio 2016 Olympic Games at the Maracana stadium in Rio de Janeiro. Source: Getty Images
Brazil's flag bearer was canoeist Isaquias Queiroz Dos Santos, who won two silver medals and one bronze.