BEIJING The Beijing Olympics ended with a blaze of deafening fireworks on Sunday, bringing down the curtain on a Games that dazzled the world with sporting brilliance and showcased the might of modern day China.
The sporting extravaganza failed to quell criticism of China's human rights record, although the International Olympic Committee (IOC) gave the organisers the thumbs-up and said the Games would leave a positive legacy for future generations.
"Tonight we come to the end of 16 glorious days we will cherish forever," IOC President Jacques Rogge told the 91,000-strong crowd in the Bird's Nest stadium.
"The world learned more about China, and China learned more about the rest of the world," he said. "These were truly exceptional Games."
The IOC said 43 world records and 132 Olympic records were broken in China, which spent $43 billion (23 billion pounds) on the event -- three times more than the budget for the 2012 Games in London.
Reflecting China's new-found confidence, the nation's athletes took their gold medal tally on the final day to 51 after winning their first two Olympic boxing titles, the most any country has bagged since the Soviet Union in Seoul in 1988.
The United States finished with 36 golds, level with their table-topping haul in 2004, but way behind the host nation.
The U.S. haul got a boost on Sunday when the men's millionaire basketball team beat Spain in a thrilling final.
In the last athletics race, Kenya's Sammy Wanjiru led an African sweep of marathon medals, lifting his arms in triumph as he sped around the Bird's Nest for the last lap.
SPORT TAKES CENTRE STAGE
China's Communist leadership no doubt breathed a collective sigh of relief as the giant Olympic torch was extinguished.
The run-up to the Games had cast a harsh light on China, bringing unrest in its Tibetan region to a global audience and showing that its rulers would not brook internal dissent.
But over the past two weeks, Beijing has wowed the visiting world with its superlative venues, army of smiling volunteers, glitch-free transport and seamless organisation.
Fears about pollution evaporated as blue skies finally broke through the haze. Criticism of China's human rights record took a backseat as two athletes redefined sporting excellence.
Michael Phelps swam into the record books by winning an astonishing eight gold medals in the translucent Water Cube. On the track, Jamaica's Usain Bolt captivated the crowds with three sprint gold medals, all secured in world record times.
But critics said enough jarring notes had sounded to spoil the symphony, with China refusing any protests during the Games, and sentencing two elderly women to a year of re-education for pushing for the right to demonstrate.
Rogge told reporters on Sunday the IOC could not force change on a state "or solve all the ills of the world", but that the Games had promoted a heightened awareness of the environment in China and left an array of venues to nurture future champions.
The United States took a tougher line, pressing for the immediate release of eight Americans detained for staging protests in favour of Tibetan independence during the Games.
"We are disappointed that China has not used the occasion of the Olympics to demonstrate greater tolerance and openness," the U.S. embassy said in a statement.
LONDON WAITS IN WINGS
The British have made clear they will not even try to emulate the Beijing epic and showed on Sunday a youthful, exuberant image of London life, complete with a double decker bus bearing rock icon Jimmy Page of Led Zeppelin and David Beckham, the world's most famous soccer player.
Delighted after their best Olympic performance in a century that left Britain fourth in the medals table, Britain also celebrated the handover of the Olympic flag on Sunday with a street party outside the gold-tipped gates of Buckingham Palace.
The London cameo was dwarfed by the grandiose set pieces put on by China to wrap up its show, with hundreds of performers climbing a huge tower and acrobats in illuminated outfits soaring into the night sky, set alight by the fireworks.
Ordinary Chinese glowed with national pride at their achievement in staging the Games and at their athletes' prowess, coming in their thousands to gawp at the pharaonic venues.
However, in some parts of the city it was impossible to tell the Games were going on and Olympic veterans said Beijing lacked the international party atmosphere of previous Olympics.
But there was a United Nations feel to the sport, with a record 86 states winning medals against 74 in Athens, including, for the first time, Afghanistan, Mauritius, Tajikistan and Togo.
Showing the sporting extravaganza had lost none of its lustre, the Games also looked certain to become the most viewed in their 112-year history, with audience figures up between 20 and 30 percent on 2004 levels.
Worries about doping hovered over the Games as always, with the IOC conducting some 5,200 tests and uncovering six cheats.
Four horses in the equestrian event also tested positive for banned substances. An IOC official said on Sunday they still had a backlog of four days of tests to analyse.
(Editing by Jeremy Laurence)