Michael Phelps, the legendary American swimmer on Saturday bade goodbye to competitive swimming by extending his world record as the U.S. team won gold in the 4x100 medley relay. Earlier, Phelps announced that he will quit professional swimming career after the London Olympics.

The 27-year old American swimmer from Baltimore holds the honor of 'the most decorated Olympian' in sporting history, with 22 Olympic medals. Phelps redefined the excellence of swimming with some incredible feats that has stood the test of time.  

It was a deserving end to a magnificent and path-breaking career of the iconic swimmer as the U.S. team defended the 4x100 medley relay title, which it has never lost in Olympics thus far.

"I told myself that I never wanted to swim when I was 30. I've been able to do everything I wanted, I've been able to achieve the goals I wanted to achieve, and I've managed to do every single thing. It's time for other things," Phelps told Reuters.

Phelps on Friday, won his 17th gold in the 100-meter butterfly. Though Phelps debuted in 2000 Sydney Olympics as a 15-year old, he started his Olympic medal collection from 2004 Athens Olympics where he picked up six gold medals, followed by eight gold medals in 2008 Beijing Olympics and three gold, two silver and two bronze medals in London 2012 Olympics.  

"It's not only the number of medals, it's the quality. Eighteen gold out of 22 medals? Two silver, two bronze? World records, you can look at all that. I just think the quality of it is so great, nobody can match that," said Coach Bob Bowman, who trained Phelps since he was 11.

Phelps holds several world records to his credit, including the highest Olympic medals in individual events for a male (13). In winning eight gold medals at the 2008 Beijing Games, Phelps took the record for the most first-place finishes at any single Olympic Games. Last week, Phelps overtook Soviet gymnast Larisa Latynina's Olympic medal tally of 18 medals. Latynina, now 77, was in London to witness Phelps overtake her previous overall total of 18.

Here are some of the spectacular moments of Phelps' swimming records from the London Olympics: