After a record-breaking Olympics that's being described by some as one of the best ever, China put on an amazing display for Beijing's closing ceremony.
Performers' bright costumes and impressive acrobatic displays dazzled the 90,000 people in the Bird's Nest stadium and millions of others who were watching all over the world.
Thousands of dancers performed complicated routines with precision timing.
And huge firework displays erupted from 18 different sites across the city to the delight of crowds inside the stadium and out.
After winning three gold medals in Beijing, cyclist Chris Hoy was given the honour of carrying the flag for Team GB during a parade for the all countries that took part in the Games.
Leaders from all over the world were in town to enjoy the ceremony, including the British Prime Minister Gordon Brown. It looks like he's enjoying it, but what's shocked his wife Sarah?
Wow! Maybe it was seeing these drummers performing so high in the air. Don't look down!
In the UK, thousands of people watched the moment London became the official host city of the next Olympics on giant screens scattered across the home nations.
Back in China, a London bus was driven into the Bird's Nest stadium to give the world a taste of what to expect at the Games in 2012.
David Beckham got a massive cheer when he appeared to kick a football into the stadium from the top of the bus. Later he said he'd been really nervous about it all going wrong!
In London, thousands of people in London got to go to a free party outside the Queen's official home, Buckingham Palace, to celebrate the Olympic handover.
Bands like McFly, Scouting for Girls and the Feeling all performed songs related to the Olympics. McFly chose to cover Abba's Winner Takes It All.