The Rio Olympics ended with a spectacular carnival-inspired closing ceremony, and the official handover to 2020 hosts Tokyo.
The ceremony, lasting two and three quarter hours, celebrated Brazil`s arts and was held in a wet Maracana.
The highlights were Tokyo`s impressive showcase and a vibrant carnival parade.
“These were a marvellous Olympics, in a marvellous city,” said International Olympic Committee president Thomas Bach.
“Over the last 16 days a united Brazil inspired the world, in difficult times for all of us, with its irresistible joy for life.”
Bach officially closed the Games of the 31st Olympiad after 16 days of competition, featuring 11,303 athletes from 206 nations and a refugee team.
The ceremony, watched by billions around the world, featured the parade of athletes and a dramatic extinguishing of the Olympic flame.
Women`s hockey captain Kate Richardson-Walsh carried the flag for Great Britain, who finished the Games with 67 medals – their highest tally at an overseas Olympics.
Super-heavyweight boxer Joe Joyce had earlier won Britain`s final medal of Rio 2016 – a silver – as they finished second in the medal table to the United States, ahead of China.
The ceremony featured the symbolic handover of the Olympic flag. Rio mayor Eduardo Paes returned the flag to IOC president Thomas Bach, before it was passed to Tokyo governor Yuriko Koike.
That was followed by an impressive 12-minute showcase of Tokyo, which included Japan`s Prime Minister Shinzo Abe popping put of a green pipe dressed as computer game character Super Mario.