The flame has gone, bright white fireworks shoot from the roof of the stadium, captured by a camera outside. The Maracana is an illuminated beacon in Rio. That was spectacular.Copyright: BBC
- Copyright: BBC
I'll be honest, it looked a little like dancing broccoli. Now, in front of the rotating sculpture that starred in the opening ceremony Mariene de Castro sings under a cascade of fake rain. I'm not sure that was needed this evening.
Stick with it, there's only about 25 minutes to go. Remember the fluffy green and yellow outfits we saw earlier? They are out there now, joined by red and a hint of purple. This is a tribute to Rio and the musicality of its people. Basically, we're having a carnival.Copyright: BBC
IOC president Thomas Bach brings the formalities to an end.
"I declare the games of the 31st Olympiad closed.
"I call upon the youth of the world to assemble in Tokyo, Japan to celebrate the Games of the 32nd Olympiad. Bye, bye Rio."Copyright: BBC
More from IOC president Thomas Bach: "Together we can go even further. Together, we can aim higher. United in our diversity, we are even stronger.
"Thank you refugee athletes. You have inspired us with your talent and human spirit, you are a symbol of hope for millions of refugees in the world. We will continue to be at your side after these Olympics.
"These were a marvellous Olympic Games in THE marvellous city. These Games are leaving a legacy for generations to come. History will talk about the Rio before the Olympic Games and a much better Rio after the Olympic Games.
"We arrived in Brazil as guests, today we depart as your friends. You will have a place in our hearts for ever."
IOC president Thomas Bach: "Congratulations Brazil.
"Brazil, we love you. Thank you for your warm hospitality. For the last 16 days a united Brazil inspired the world.
"You have many reasons to be proud. These Olympic Games show diversity is an enrichment for everyone. These Olympic Games were a celebration of diversity."
Hmmmm, it has been a bit soggy at the Maracana. So much so that some of the athletes called it a day before the end. There will be some wet Olympians at wrap parties all over Rio.
More fromCarlos Arthur Nuzman, the president of the Rio 2016 Organising committee: "Twenty-seven world records and 91 Olympic records. We have organised a marvelous Olympics in a marvelous city.
"When we won the Games I said Rio was ready to make history. Rio has delivered history. Good luck for Tokyo 2020."
Carlos Arthur Nuzman, the president of the Rio 2016 Organising Committee: "We have organised the most important event in the world. This is a magic place.
"It was a great challenge, but a challenge with great success. I'm proud of the city, my country and my people.
"All Brazilians are Olympic heroes. We celebrate together. You are the gold medal of the people on all the planet."Copyright: BBC
Watch this, Japan's section of the closing ceremony. What a way to announce you arrival. Excitement levels raised for 2020.
Olympic cycling gold medalist
Charlotte Dujardin and Valegro winning individual dressage gold.
It was a perfect performance and very emotional as it will probably be the last time they ride in a competition together.
Charlotte knew the performance was good and welled up as soon as they finished. It made me well up too. I now understand the connection between horse and rider.
Speeches time. President of the organising committee Carlos Nuzman and IOC president Thomas Bach. There's not many people watching fellas, so don't be nervous.
"See you in Tokyo" is the message, followed by bright fireworks shooting into the night sky. That's may favourite part of the night so far.Copyright: BBC
This is outstanding. The Prime Minister of Japan has appeared out of Super Mario-style water pipe, wearing a Mario hat. We're then treated to a hologram and light show. It's already got me pumped for how good Tokyo will be.Copyright: BBCCopyright: BBC
I'm just thinking about how gutting it must be for Rio to hand over the Olympic flag. All that work over so many years, and now it's over. In contrast, the excitement is just beginning for Tokyo. We're getting some shots of the city and what we can expect. Bullet trains, glass buildings and Manga cartoons. It looks belting.
The governor of Tokyo gets her hands on the Olympic flag and give it a good wave. Not as much gusto as Boris Johnson in 2008. We're now going to get a sneak peak of Japan's offering in four years.Copyright: Getty Images