China basked in the glow of their 50th gold medal and got a clear thumbs-up from International Olympic Committee on the last day of the Games on Sunday. The IOC brushed aside criticism of its decision to hold the Games in China. It said Olympics could not solve all the world's problems, but argued they had left a positive legacy for China.
The United States was less enthusiastic, pressing for the immediate release of eight Americans detained for staging protests in favor 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.
On the final day of competition, Kenya's Sammy Wanjiru led an African sweep of marathon medals, lifting his arms in triumph as he accelerated around the Bird's Nest stadium for the last lap.
There was emotion too for the American men's volleyball team, settling a score against Brazil who had beaten their compatriots in the women's final the previous day.
The team's determination to win final-day glory had also been reinforced when the father-in-law of the team's coach was stabbed and killed in Beijing on the first day of the Games.
China celebrated their 50th gold, a surprise win by Zou Shiming in the boxing ring, the first time that landmark had been reached since the Soviet Union got 55 golds in Seoul in 1988.
The hosts plan a closing extravaganza later when they will hand over the Olympic flag to 2012 hosts Britain.
They will be pleased with the IOC's verdict. President Jacques Rogge praised an "impeccable" operation that had set the bar very high for London in 2012.
He said the sporting body could not force change on a sovereign state "or solve all the ills of the world". Nevertheless, the host country had been "scrutinized" by the world and had opened itself up, he said.
"The world learned more about China, and China learned more about the rest of the world. And together, we shared the excitement and drama of the Games," Rogge said.
The government was intending to invest heavily in mass sports to harness popular enthusiasm, he said, while the Games had also promoted a heightened awareness of the environment in China.
Rogge, though, had less to say when confronted with the tale of two women in their seventies, who were sentenced to a year's re-education for applying to stage a protest during the Games.
"The reply we received from authorities was that this was an application of Chinese law," he said. "The IOC is not a sovereign organisation and we have to respect Chinese law."
Beijing's polluted air had been one of the biggest concerns in the run-up, and health concerns led Ethiopian world record holder Haile Gebreselassie to pull out of the men's marathon.
In the end, those fears appeared largely unfounded when the race was held, after the government spent billions to clean the air in recent months and an overnight storm did the rest.
Running under blue skies, Wanjiru crossed himself and sank to his knees after finishing in an Olympic record time of two hours six minutes 32 seconds, looking fresh despite the heat and sealing a fifth gold for his country in athletics.
"I pushed and pushed, I had to, to tire the others," Wanjiru said. "My plan was to push my body to the limits."
Despite their pedigree of distance running and big-city marathon wins, it was Kenya's first Olympic marathon title. Morocco won the silver, Ethiopia the bronze.
The race began in the capital's massive Tiananmen Square, symbol of Communist rule, site of Mao Zedong's mausoleum and of pro-democracy protests in 1989. It ended in the Bird's Nest, symbol of China's modern face.
REDEMPTION FOR U.S. BASKETBALL?
In the other highlights of Day 16, Russia won golds in men's boxing and the women's group rhythmic gymnastics to cement third place in the medals table.
Shiming won light-flyweight boxing for China and said he was "proud to show the strength of the Chinese people with my fist".
Later, the Americans are hoping for redemption in the men's basketball final, with the giants of the NBA expected to beat Spain to win the gold that eluded them at the 2004 Athens Games.
Victory would bring the United States up to 36 golds, level with their table-topping haul in Athens, but way behind China.
With one fifth of the world's population to choose from, China have poured billions into a Soviet-style training system geared to maximizing medal success.
Their new sporting superpower status reflects their emerging global economic might, and China's government feels the $43 billion investment in the Games was money well spent.
British Prime Minister Gordon Brown and former England soccer captain David Beckham will be at the Bird's Nest on Sunday night as the Olympic flag is lowered and passed to the 2012 hosts, a nation delighted over their fourth place in the medals table.
Beckham said in an interview on Saturday that China could be very proud of what they had done in staging the Olympics, but promised London would do even better, "without a doubt".