Michael Phelps swims into retirement with 18th Olympic gold on U.S. 400 medley relay team

LONDON – The final swim of Michael Phelps' incomparable career was a victory lap, a coronation and a mere formality.

Phelps' butterfly leg in the 400-meter individual medley helped propel the United States to an emphatic victory and sent Phelps into retirement with his 22nd career Olympic medal – a staggering 18 of them gold. Both totals are records and it will take a long time before those totals are even challenged, much less broken.

[Related: Michael Phelps gives his career a proper sendoff]

Phelps was joined on the winning relay by backstroker Matt Grevers, breaststroker Brendan Hansen and freestyler Nathan Adrian. The U.S. has never lost an Olympic 400 medley relay, and this one was never in doubt after Phelps regained the lead on the third leg. The Americans won with a time of 3:29.35. Japan (3:31.26) took the silver medal and Australia (3:31.58). captured the bronze.

"I could probably sum it up in a couple of words and just say, 'I did it.' " Phelps said of his career. "Through the ups and downs, I've still been able to do everything that I've ever wanted to accomplish. I've been able to do things nobody's ever done and that's what I've always wanted to do."

"The memories I have for this week will never go away," he added.

This victory gives Phelps four gold medals and two silver for the London Olympics – an impressive haul for a 27-year-old and especially impressive after his shaky start here.

Phelps shockingly missed the podium in his first event, the 400 individual medley, then regrouped by winning the 100 butterfly and 200 IM and swimming strong legs on the gold medal-winning 800 freestyle relay. His silver medals were in the 400 free relay and 200 butterfly.

[Photos: Michael Phelps]

His final three swims all ended with him on the top step of the podium, listening to the "Star-Spangled Banner." Phelps was more emotional on the podium than he had been in Olympics past, as the emotional weight of his career's end sunk in.

After receiving his final gold medal, Phelps got a lifetime achievement award from FINA, the sport's swimming federation. The trophy boasted the words "greatest Olympian of all time," a title he only took partial credit for.

"I've been able to become the best swimmer of all time and we got here together," Phelps said of his longtime coach Bob Bowman.

"I thanked him. And it was funny when I got out of the pool, he was like, 'That's not fair,' and I said, 'What's not fair?' And he goes, 'You were in the pool' and I was like, 'Yeah, my tears were behind my goggles. Yours are streaming down your face.'

"I wouldn't be here today without everything he has done for me. I love him to death and I'm thankful for somebody who cares so much for me and who has put up with all of my crap for the last 15 years. I literally cannot thank him enough."

More Olympics coverage on Yahoo! Sports:

Related Olympics coverage on Yahoo! Sports:
Video: Was Michael Phelps' last individual race perfect?
Video: Debbie Phelps talks about Michael's retirement plans
Debbie Phelps: Michael will hang it up