LONDON — With a little British pomp and a lot of British pop, London brought the curtain down on a glorious Olympic Games on Sunday in a spectacular, technicolor pageant of landmarks, lightshows and lots of fun.

The closing ceremony offered a sensory blast including rock 'n' roll rickshaws, dustbin percussionists, an exploding yellow car and a marching band in red tunics and bearskin hats.

There was a show-stopping reunion of the Spice Girls and a comedy sequence featuring Monty Python's Eric Idle performing "Always Look on the Bright Side of Life" accompanied by Roman centurions, Scottish bagpipers and a human cannonball.

It was all delivered in a psychedelic mashup that had 80,000 fans at Olympic Stadium stomping, cheering and singing along. Organizers estimated 300 million or more were watching around the world.

What a way to end a games far more successful than many Londoners expected. Security woes were overcome, and traffic nightmares never materialized. The weather held up, more or less, and British athletes overachieved.

It all came with a price tag of $14 billion — three times the original estimate. But nobody wanted to spoil the fun with such mundane concerns, at least not on this night.

"We lit the flame, and we lit up the world," said London organizing committee chief Sebastian Coe. "When our time came, Britain, we did it right."

International Olympic Committee President Jacques Rogge declared the Olympics over with praise for the athletes.

"Through your commitment to fair play, your respect for opponents, and your grace in defeat as well as in victory, you have earned the right to be called Olympians," he said, adding "these were happy and glorious games."

But the night was about splash more than speeches.

Festive and fast-moving, the ceremony opened with pop bands Madness, Pet Shop Boys and One Direction, a shout-out to Winston Churchill and a tribute to the Union Jack — the floor of Olympic Stadium floor arranged to resemble the British flag.

Monochrome recreations of London landmarks were covered in newsprint, from Big Ben's clock tower and Tower Bridge to the London Eye ferris wheel and the chubby highrise known as the Gherkin.

Street percussion group Stomp built the noise into a frenzy, and dancers brandished brooms, in a nod to the spontaneous popular movement to clean up London after riots shook neighborhoods not far from Olympic Stadium just a year ago.

Liam Gallagher performed "Wonderwall," a 1990s hit by his former band, Oasis, Muse rocked the house with the hard-edged Olympic anthem "Survival," and Queen guitarist Brian May was joined by singer Jessie J for a crowd pleasing "We Will Rock You."

And there still was more to come.

The Who was expected to take the stage at the end of the three-hour paean to British pop, and to the country's triumphant turn hosting the games. The headline performers were each paid a pound, a little more than $1.50.

Prince William's wife, Kate, and Prince Harry took seats next to Jacques Rogge, the president of the International Olympic Committee. They sang along to "God Save the Queen."

But perhaps the best seats in the house were for the 10,800 athletes, who marched in as one, rather than with their nations, symbolizing the harmony and friendship inspired by the games.

As the crowd cheered their heroes and flashbulbs rippled through the stadium, the Olympians cheered back, some carrying national flags, others snapping photographs with smartphones and cameras.

They held hands, embraced and carried each other on their shoulders, finally forming a human mosh pit on the field.

The ceremony had something for everyone, from tween girls to 1960s hippies. The face of John Lennon appeared on the stadium floor, assembled by 101 fragments of sculpture, and just as quickly gave way to George Michael.

Muse, Fatboy Slim, and Annie Lennox all performed. There was no sign of Queen Elizabeth II, who made a memorable mock parachute entrance at the July 27 opening ceremony.

Eight minutes were turned over to Brazil, host of the 2016 Games in Rio de Janeiro, which promises an explosion of samba, sequins and Latin cool. Following tradition, the mayor of London handed the Olympic flag off to his Rio counterpart.

Britons, who had fretted for weeks that the games would become a fiasco, were buoyed by their biggest medal haul since 1908 — 29 golds and 65 medals in all.

The United States edged China in both the gold medal and total medal standings, eclipsing its best performance at an Olympics on foreign soil after the Dream Team narrowly held off Spain in basketball for the country's 46th gold.

"It's been an incredible fortnight," said Coe, an Olympic champion in his own right.

While the games may have lacked some of the drama and grandeur of the Beijing Olympics in 2008, there were many unforgettable moments.

Jamaican sprinter Usain Bolt became an Olympic legend by repeating as champion in both the 100-meter and 200-meter sprints. Michael Phelps ended his long career as the most decorated Olympian in history.

British distance runner Mo Farah became a national treasure by sweeping the 5,000- and 10,000-meter races, and favorite daughter Jessica Ennis became a global phenomenon with her victory in the heptathlon.

Female athletes took center stage in a way they never had before. American gymnast Gabby Douglas soared to gold, the U.S. soccer team made a dramatic march to the championship. Packed houses turned out to watch the new event of women's boxing. And women competed for Saudi Arabia, Qatar and Brunei for the first time.

And then there was Oscar Pistorius, the double-amputee from South Africa running on carbon-fiber blades, who didn't win a medal but nonetheless left a champion. And sprinter Manteo Mitchell, who completed his leg of the 4x400 relay semifinal on a broken leg, allowing his team to qualify and win silver.

In a switch from opening night and what appeared to be a concession to its vocal critics, NBC decided to stream the ceremony live online, in addition to broadcasting it during prime time.

Britons seemed exhausted and exhilarated after two glorious weeks in the world's spotlight, and just months after the country celebrated the queen's 60th year on the throne with a magnificent pageant and street parties.

Some at Olympic Park acknowledged happy surprise that not much had gone wrong, and so much had gone right.

"I was a bit worried we wouldn't be able to live up to it," said Phil Akrill of Chichester. "But walking around here it's just unbelievable."

Even non-Brits were proud of their adopted homeland.

"It's just been a really nice thing to see," said Anja Ekelof, a Swede who now lives in Scotland. "The whole country has come together."