Kenya's Sammy Wanjiru led an African sweep of the marathon medals on the final day of the Olympics on Sunday, lifting his arms in triumph as he accelerated around the Bird's Nest stadium for the last lap.
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.
Despite their pedigree of distance running and big-city marathon wins, it was Kenya's first Olympic marathon title.
Jaouad Gharib of Morocco won the silver, and in a close finish Tsegay Kebede of Ethiopia overtook exhausted compatriot Deriba Merga on the last lap to claim 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.
In the evening, the hosts will wrap up a spectacular Games sitting proudly on top of the medals table and with a closing extravaganza planned in the same stadium.
Before that there are 11 more golds to contest, including the finals of men's basketball and volleyball, and six big bouts in the boxing ring.
In the final of the men's basketball, the US giants of the NBA are expected to win the gold they failed to achieve at the 2004 Athens Games. They face world champions Spain, who they trounced in the group stage.
The Americans will also hope to settle a score against Brazil in the men's volleyball, after losing to them in the women's final on Saturday.
Two golds would bring the United States up to 36 golds, level with their table-topping haul in Athens.
They would still be far behind hosts China, who have dominated the medals table from start to finish, battering all-comers into submission with 49 golds.
Golds flowed in badminton, diving, gymnastics, shooting, table tennis and weightlifting. That they topped the medals table was widely predicted, but the size of the margin surprised many.
With one fifth of the world's population to choose from, China have poured billions into a Soviet-style training system geared to maximising medal success. Their new sporting superpower status reflects their emerging global economic might.
Yet there is a recognition inside China that success did not reflect large-scale participation in sport, and the ruling Communist Party acknowledges facilities need to be improved.
DAZZLING, LIGHTNING, SWIMMING
Nevertheless as the Olympic flag is lowered at Sunday's closing ceremony and passed to 2012 hosts Britain, China's government feels the $43 billion (23 billion pound) investment in the Games was money well spent.
Around $100 million was spent on the opening and closing ceremonies alone.
"The Chinese nation's Olympic dream has always been bound to its course of national revival," state news agency Xinhua commented on Sunday. "The Beijing Olympic Games have added impetus for national self-confidence."
Despite a build-up dominated by talk of pollution and human rights, attention during the Games has focused on China's dazzling venues and the scintillating sport inside them.
There were some small protests over Tibet, a couple of militant attacks in western China around the start of the Games, and the murder of a U.S. tourist.
Prime Minister Gordon Brown and former England football captain David Beckham will be at the Bird's Nest on Sunday night as China hand over the baton to Britain, a nation delighted over their fourth place in the Beijing medals table.
"The golden triumphs of the present British team can only serve as further inspiration to those who will be working hard over the next four years to make the London Games a shining example of Olympic success," the Queen said in a statement.
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".
The former Manchester United and Real Madrid midfielder, now playing for LA Galaxy, will be joined during London's eight-minute slot in the Games finale by Led Zeppelin guitarist Jimmy Page and singer Leona Lewis.
"There was obviously a lot of negativity leading up to the competition," Beckham said. "But everyone knew that once the Games actually started, that would disappear and the success of the teams and the athletes would take over."