LONDON -- The final tally after Michael Phelps's final race:
Twenty-two medals. Eighteen golds. And a place in Olympic lore all his own.
In what he insists will be his last competition as an Olympian, Phelps authored a memorable ending, putting the United States ahead on the third leg of the 4x100-meter medley relay en route to the gold medal.
The United States finished in 3 minutes 29.35 seconds, a mere 1/100th of a second from tying its own Olympic record. Japan took silver, while Australia claimed bronze.
Phelps stands atop a figurative podium that no athlete in history has approached. He has more gold medals than any other athlete in Olympic history has total medals, and he has twice as many gold as anyone else.
There was some uncertainty around the outcome of this one, at least until he took the pool.
Matt Grevers gave the United States a small advantage over China on the first leg, finishing the backstroke in 52.19 seconds. But the US dipped to second in an event it has traditionally dominated when Brendan Hansen gave up the lead in the breaststroke, with China leading at 1:50.26 after 200 meters.
That only set the stage for one more fantastic Phelps moment, and it was only right that he swam the pivotal leg. No other script would suffice.
So the four-time Olympian, who now has four gold and two silver medals in London after hauling in a record eight in Beijing four years ago, performed like what he is: The best swimmer the world has ever seen.
When his leg was through, the US was in first at 2:40.48.
Nathan Adrian blazed through the final freestyle leg to put the perfect cap on the race, and his teammate's swimming career.
Phelps savored the moment, grinning broadly, hugging his three teammates, and high-fiving Adrian. He has said he prefers the camaraderie of the relays to his individual pool pursuits, and the shared joy was evident in his final, victorious moment as an Olympian.