For the last 16 days the sport has been hard fought and serious, but tonight it was party time in the Olympic Stadium in London.

As the world bade farewell to London 2012, the host city put on the concert of a lifetime, a stunning musical extravaganza featuring stars such as Annie Lennox, The Spice Girls, Madness, Queen and Take That.

The party marked the end of British sport's most successful Olympic Games in more than a century which saw a final medal tally of 64 - 29 golds, 16 silvers and 19 bronze. And Team GB was winning medals right up to the last minute. Team GB placed third in the medals tally after the US and China.

After the Games showed off the best of British sport, the closing ceremony, attended by Prince Harry and the Duchess of Cambridge, was designed to show off the best of Britain's past and present music scene, culminating with a glimpse of the carnival that awaits in Rio in 2016.

Stars who appeared included the Pet Shop Boys, George Michael, Tinie Tempah and Jessie J, Kate Moss and Russell Brand and The Who.

The Spice Girls take the stage.The Spice Girls take the stage.

The Olympic Flag was lowered and then passed by London Mayor Boris Johnson to Jacques Rogge, president of the International Olympic Committee, who in turn presented it to Rio Mayor Eduardo Paes.

After speeches by Olympics supremo Lord Coe and Mr Rogge, the flame that reached all corners of the UK over 70 days was extinguished - and the Games were over.

In a guide to the closing ceremony, Harry said London 2012 had been an "extraordinary" event which had touched people's hearts and captured their imaginations.

US President Barack Obama echoed that view, calling Prime Minister David Cameron to "congratulate him and the people of the United Kingdom and London on an extremely successful Olympic Games", the White House said.

Huge cheers greeted British sailor Ben Ainslie as he carried the Union flag into the stadium.

"Wow. This is it... The end," Ainslie tweeted.

A giant tarpaulin depicting British model Kate Moss crosses the Olympic stadium during the closing ceremony of the 2012 London Olympic Games in London.(AFP)A giant tarpaulin depicting British model Kate Moss crosses the Olympic stadium during the closing ceremony of the 2012 London Olympic Games in London.(AFP)

"We should all be very proud to have held the greatest Olympics in modern times. Huge thanks to everyone involved."

Diane Borg carried the Maltese flag.

Following the flag-bearers, thousands of athletes walked through the spectators, medals round their necks, high-fiving fans and waving to the cameras.

But conscious of the night's tight timings, a series of stage hands clad in black ran alongside the athletes, comically lifting their knees to their chest to hurry them along.

As athletes gathered in the segments between the ramps to the stage, some perched on others' shoulders.

And while the fans eagerly videoed and took photos of their sporting heroes, the athletes could be seen returning the favour, clutching their own cameras to capture the crowd on film.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.