Under a brilliant full moon and the burning Olympic flame, the Greeks danced. They clapped, they sang, kicked up their legs and celebrated an Olympics that at one point was almost taken away, but in the end left them jumping with national pride.

After sponsoring more than two weeks of competition, and enduring years of ridicule and doubt from the rest of the world about whether the Games deserved to return to their birthplace, the Greeks danced and danced in their modern Olympic Stadium. About 75,000 spectators clapped along as performers served up a giant Greek wedding feast of a Closing Ceremonies, joyful that so much had gone right during the Games of the XXVIII Olympiad, and that so little had gone wrong.

Gone were the fears about terrorist attacks and smoggy traffic jams and unfinished stadiums. The Athens Olympics had come to an end, and for the most part everything worked just fine.

Greece was the smallest nation in 52 years to host the Summer Olympics, determined to recast Athens as a modern European city known for more than its ancient past. In doing so, the country spent at least $7.2 billion on the Games, including $1.5 billion to provide security -- an enormous sum that will take many years, if not decades, to pay off.

But complaints about costs were hard to find Sunday night, as Greece proudly handed off the Olympic flame to a nation 125 times its size -- China, host of the 2008 Summer Games -- secure that it had proved itself to the world.

"The Olympics came home and we showed the world the great things Greeks can do," Gianna Angelopoulos-Daskalaki, president of the Athens Organizing Committee, told the crowd. "On this stage, the world discovered a new Greece."

"Hellas! Hellas!" the crowd shouted, waving Greek flags and white hankies.

Organizers flooded the stadium with 250,000 balloons as thousands of fireworks lit up the sky. Under the dazzling light show, a succession of Greek singers and folk musicians kept the audience dancing throughout the Closing Ceremonies. Toward the end, the mood became so infectious that small groups of athletes from Brazil, Britain, France and other nations broke away from the security cordon in the stadium infield and danced around the track.

Despite the festive atmosphere, strict security measures remained in place until the end. Several helicopters and a blimp circled the stadium throughout the ceremonies.

Worries about political disruptions also kept U.S. Secretary of State Colin Powell from attending; he canceled a planned trip to Athens after Greek anti-war protesters angry about his visit clashed with police Friday in downtown Athens.

Unlike the Opening Ceremonies, where fans loudly cheered the delegations from Iraq and Afghanistan and gave the silent treatment to U.S. athletes, politics were not on display Sunday night. Athletes from 202 nations entered the stadium at the same time, mixing together on the infield.

The United States led the overall medal standings with 103, capped off by an unexpected silver in the last event of the Games, the men's marathon.

American athletes dominated the competition in track and field, women's team sports and the swimming pool, where Maryland's 19-year-old Michael Phelps won a record eight medals. A major disappointment: the men's basketball team, which lost three games and settled for bronze.

The biggest controversies were athletic ones, thanks to cheaters and judges who shook up several events.

At least 22 competitors were flagged for drug-testing violations, resulting in the revocation of seven medals. Greece in particular was shamed by the expulsion of two national heroes, medal-winning sprinters Kostas Kenteris and Katerina Thanou, who were kicked off the team after missing several drug tests.

Olympic officials said athletes had gotten the message that doping would not be tolerated. "These were the Games where it became increasingly difficult to cheat and where clean athletes were protected," Jacques Rogge, president of the International Olympic Committee, told the audience.

Earlier, Rogge cheered the Greeks in attendance by thanking them for their hospitality. "Dear Greek friends, you have won," he said in their native language, before lapsing into French. "You have won by brilliantly meeting the tough challenge of holding the Games."

Four years earlier, the IOC came close to yanking the Olympics away from Athens. Construction projects and other preparations had barely progressed since the Games were awarded to Greece in 1997. Former IOC president Juan Antonio Samaranch revealed recently that Olympic overseers were about three months from making an emergency decision to move the Games to South Korea.

Spurred on by the threat, Greek officials worked feverishly over the next four years to prove that it could get ready on time. The challenges were substantial: Athens needed a new international airport, new highways, an expanded subway system and more than a dozen new athletic arenas.

As the deadline neared -- the roof on the Olympic stadium slid into place just three months ago -- there was little time for testing. Even Olympic officials wondered if things would work when the crowds showed up. By and large, they did.

"At the end of the day, the biggest surprise to everybody is that there were no major issues," Ioannis Spanudakis, managing director for the Athens 2004 organizing committee, said in an interview.

Not everything went exactly as organizers hoped. While the Athens committee met its attendance projections by selling more than 3.5 million tickets, many athletes performed in front of sparse crowds. Television ratings were higher than in Sydney four years earlier, but cameras couldn't conceal the fact that stadiums were often largely empty.

The Closing Ceremonies, however, were a sellout. Even after the music died down, many Greeks lingered in the stadium for more than an hour, posing for pictures and dancing in the aisles.

Fireworks explode in the Athens night as the Chinese and Greek flags fly side-by-side during the Closing Ceremonies of the 2004 Summer Olympics.American gold medalist Andre Ward waves to spectators during an awarding ceremony after winning the light heavyweight championship.Beijing Mayor Wang Qishan, whose country will host the 2008 Summer Games, waves the Olympic flag as IOC President Jacques Rogge looks on.