Michael Phelps put the finishing touches on an epic Olympic career in London, where a raft of young swimmers he inspired made their mark and promised to carry swimming through Rio 2016.
US 17-year-old Missy Franklin, with four gold and two world records in her first Olympics, and 15-year-old Katie Ledecky, with an upset triumph in 800m freestyle, helped propel United States to its familiar spot atop swimming medals table with 16 gold, 8 silver and 6 bronze for a total of 30.
World record-breaking swims by teenager Ye Shiwen and 20-year-old Sun Yang saw China confirm their arrival as an Olympic swimming power with five gold and 10 overall as Australia, Britain and Germany were left to wonder what went wrong.
Ye's tremendous finish in her world record-breaking 400m medley victory sparked a swirl of doping specualtion in the Western press, which Sun angrily denounced.
"People think China has so many gold medals because of doping and other substances, but I can tell you it is because of hard work," said Sun, who became the first Chinese man to win Olympic swimming gold with his triumph in the 400m.
"Chinese are not weaker than those in other countries," added Sun, who also won the 1,500m free in a majestic world record swim.
Right behind China, France claimed a superb four golds, with Yannick Agnel delivering a scintillating 4x100m free relay gold ahead of the United States before a dominant victory in the 200m freestyle that left US world champion Ryan Lochte trailing in his wake.
France's four golds were one more than they had claimed in all prior Games, and Agnel said he had no intention of letting up before Rio.
Australia floundered after big guns James Magnussen and James Roberts failed to fire in the freestyle sprints.
Australia's 4x100m free relay women won gold on the opening night of the Games, but after Magnussen and Roberts delivered sub-par swims that left Australia out of the medals in the men's 4x100m free, the Aussies never seemed to recover.
Magnussen, 21, still has time to regroup and head to Rio, but he said he came away from his first Olympics even more impressed with what Phelps had accomplished in four Olympic campaigns that yielded a record 22 medals -- 18 of them gold.
"I have a lot more respect for guys like Michael Phelps who can come to the Olympics and back it up under that pressure," Magnussen said.
Phelps was under pressure in London, if not to match his Bejing exploits then to avoid a large-scale failure that would, for some, shadow that achievement.
Never fear, after a stuttering start Phelps finished with four gold medals and two silvers, shattering the record for total medals in a career.
In fact, his 18 career gold matches the previous record for total medals amassed by Soviet gymnast Larisa Latynina.
Chad le Clos, who became the first South African man to win individual Olympic swimming gold, unabashedly admitted his entire career was modeled on that of Phelps.
His reward was to become the first in a decade to vanquish Phelps in a major international 200m butterfly final.
"He was the reason I swam the butterfly. It's not a joke," Le Clos said. "That's why I swim the 200 freestyle, both the IMs. I don't swim it for any other reason than just because Michael does."
Phelps "choked up" when he heard that he was Le Clos's hero and role model, coach Bob Bowman said.
"It means Michael's done what he wanted to do: affect the sport of swimming," Bowman said.
Phelps insisted he would never return to competition, but said he remains fascinated to see what would happen in the sport, where swimmers are making inroads on the incredible times of the polyurethane "supersuit" era.
Nine world records in eight events fell in the London Aquatics Centre pool.
It was hardly the record rush of Beijing's 25 -- or the ridiculous 43 of the 2009 Rome world championships -- but it was a start.
"There's so much more that can be done," Phelps said.