AP PHOTOS: A look at Michael Phelps' Olympic glory

Michael Phelps heads into retirement the only way imaginable — with an 18th Olympic gold medal.

Since his Olympic debut as a 15-year-old in Sydney a dozen years ago, Phelps has won twice as many golds as any other Olympian. His total of 22 medals is easily the best mark, too.

Phelps capped off a mind-boggling career with a victory in the 4x100-meter medley relay Saturday.

Here's a look back at Phelps' Olympic career in photos: