The finale was a formality, more a coronation than a contest. Michael Phelps headed into the retirement the only way imaginable -- with another gold medal.
Reclaiming the lead with his trademark butterfly stroke, the one seen in his Olympic debut as a 15-year-old in Sydney a dozen years ago, Phelps won the 18th gold of a mind-boggling career in the 4x100-meter medley relay Saturday.
When it was done, Phelps hugged his teammates -- Matt Grevers, Brendan Hansen and Nathan Adrian -- before heading off the deck for the final time in his suit. He waved to the crowd and smiled, clearly at peace with his decision to call it a career.
And what a career it was!
Phelps retires with twice as many golds as any other Olympian, and his total of 22 medals is easily the best mark, too. He can be quite proud of his final Olympics as well, even though there were times he had trouble staying motivated after winning a record eight gold medals at the Beijing Games four years ago.
Bouncing back from a disappointing first race in London, a fourth-place finish in the 400 individual medley, Phelps wound up with more medals than any other swimmer at the games: four golds and two silvers.
Grevers had the Americans in front on the opening backstroke leg of the relay, but Kosuke Kitajima put Japan slightly ahead going against Hansen in the breaststroke. Not to worry, not with Phelps going next.
He surged through the water in the fly, handing off a lead of about a quarter of a second to Adrian for the freesytle anchor. The Americans won going away in 3 minutes, 29.35 seconds, just off their own Olympic record from Beijing. Japan held on for silver in 3:31.26, with Australia taking the bronze in 3:31.68.
The U.S. men had never lost the medley relay at the Olympics, and they weren't about to now on the final night of swimming at the Olympic Aquatics Centre, on the final night for such a momentous athlete.
How momentous? The governing body of swimming, FINA, summoned Phelps back to the deck for one more award -- a silver trophy commemorating his standing as the most decorated Olympian ever. A fitting gesture, though a more appropriate color would have been gold.
Then, as if 22 medal ceremonies over the last three Olympics weren't enough, Phelps made one more victory lap around the pool, even stopping off at the podium, climbing to the top step again and posing with his final award.
Phelps wasn't the only star of the night. Missy Franklin capped off a brilliant Olympic debut by helping the U.S. take gold in the women's 400 medley relay -- with a world-record time, no less.
The 17-year-old Franklin, who will begin her senior year of high school when she gets back to Colorado, seems destined to be America's new star in the post-Phelps era after taking four golds and a bronze while swimming seven events -- the same number as Phelps.
A definite bit of symmetry there, though Franklin doubts anyone can ever replace Phelps.
"I don't think his shoes will ever be filled. They're so huge," Franklin said. "Hopefully I can make little paths next to him."
And let's not forget Allison Schmitt, another swimmer with ties to Phelps. They trained together over the past year in Baltimore, becoming fast friends with all their goofy antics. But they sure took care of business in the pool, with Schmitt winning three golds, a silver and a bronze in London.
Franklin grabbed the lead right away in the backstroke, Rebecca Soni stretched out the advantage in the breast, Dana Vollmer cruised through the fly and Schmitt finished it off in the free, pulling away for a time of 3:52.05, beating the mark of 3:52.19 set by China at the 2009 world championships.
It was the second world record of the night and ninth of the Olympic meet, proving that fast times are still possible even without banned high-tech bodysuits.
China's Sun Yang sprinted to the finish of the sport's most grueling race to crush the world record he already held in the 1,500 freestyle, putting his own stamp on the games with a stunning time of 14:31.02.
That beat his mark from last year's world championships by 3.12 seconds.
Sun captured his second gold of the meet, adding to a gold in the 200 free. He also tied for the silver in the 200 free, and was part of the bronze medal-winning team in the 4x200 free relay.
For a brief moment, it appeared Sun might not even get a chance to swim the race. Apparently hearing a noise in the crowd, he dived into the water before the starter's gun, while everyone else remained on the blocks. Yang glanced at the starter with a confused look, got back out of the pool and waited to see if he would be disqualified.
"I could not hear the judge because there was noise in the venue," Sun said through an interpreter. "I thought I was going to be disqualified. I have done well because I was in very good shape. I really wanted this gold medal."
But the starter allowed him to go, which essentially decided the gold medal. No one else was close to Sun, who was going faster at the end than he was at the beginning, leaving everyone behind.
After looking at his time and catching his breath, Sun was overcome with emotion. He climbed on the lane rope, splashed the water, pointed toward a group of supporters waiving a Chinese flag, and broke down in tears.
Canada's Ryan Cochrane took the silver in 14:39.63, while defending Olympic champion Ous Mellouli of Tunisia settled for bronze in 14:40.31. Mellouli will get another chance for gold when he races in the 10-kilometer open water event at Hyde Park.
In a night featuring the long and short of swimming, Ranomi Kromowidjojo of the Netherlands won the women's 50 freestyle to complete a sweep of the sprints.
Having already won the 100 free, Kromowidjojo clocked an Olympic-record 24.05 in the furious, one-lap dash. Defending champion Britta Steffen of Germany went 24.06 in Beijing four years ago in a now-banned bodysuit.
Aliaksandra Herasimenia of Belarus touched in 24.28 to take the silver medal and another Dutchwoman, Marleen Veldhuis, finished in 24.39 to take bronze. Steffen, who swept the sprints in Beijing, finished fourth, while home favorite Francesca Halsall of Britain was fifth and 34-year-old Therese Alshammar of Sweden was sixth in her fifth Olympics.