London: For his Olympic swansong at the London Games, Michael Phelps was heading into uncharted waters. The 27-year-old American has spent his life demolishing records and building a stockpile of gold medals.

Special Coverage: London Olympic 2012

Medal Tally Of London Olympics 2012

But his final competition developed into a lap of honour after his mind-boggling achievements in Beijing four years ago where he won a record eight titles.

On Tuesday, he finally won his first gold medal of the London Games when he anchored the 4x200 metres freestyle relay team to victory and overhauled Soviet gymnast Larisa Latynina's previous record of 18 Olympic medals.

Less than an hour earlier he had failed to retain his 200 metres butterfly title, finishing with the silver medal.

Phelps' problem going into the Games was realising that perfection had its own flaws and, no matter which direction he looked, the only way forward was down.

"I don't think anything he could do or not do will change his legacy," said Phelps's lifelong coach Bob Bowman before the Games. "He's the greatest Olympian of all time today and I think he will be after this summer."

Phelps entered seven events in London, one fewer than Beijing and in Athens in 2004.

But in a sport where medals are won and lost by the tiniest numbers, the chances of him winning all seven were always slim.

While his main rivals were swimming faster, Phelps had not set a world record in over three years and his medal stacks were getting progressively lower.

At the 2009 world championships, he won five gold medals. In 2011, he won four, and he was always resigned to the prospect that he might not win everything he entered in London.

Cherry On The Sundae

"We've done a lot of cool, amazing, exciting things, and now it's just time to have fun," he said. "We're relaxed. This is just about what size cherry I want to put on top of my sundae."

Phelps' main obstacle after Beijing was finding the motivation to get out of bed before dawn every day and churn through the thousands of laps he needed to stay at his peak.

A global sporting icon, who has already amassed a fortune, he does not need the money or the fame and the lure of adding a few more records to his CV started to lose appeal.

Phelps partied hard after Beijing and his good boy image took a beating. He made regular trips to Las Vegas and, in 2009, he was photographed with a pipe used to smoke marijuana.

He toyed briefly with the idea of quitting but rediscovered his motivation through the pain of defeat.

With his long arms and powerful legs, Phelps is blessed with the perfect natural gifts to slice through the water as gracefully as a dolphin. What sets him apart is the predatory instincts of a killer shark.

Phelps returned to training with renewed vigour, logging up to 70kms a week and sleeping each night in a high-altitude chamber that was installed in his bedroom.

His results started to improve and he won four events at this year's U.S. Trials, ensuring that his final lap of honour would at least be a quick one.

For Bowman, London was all about the end of an unforgettable journey.

"However this ends up, it will be exactly the way he and I chose to make it end up," he said.

Phelps and his team mates savoured to the full his record-breaking medal on Tuesday, walking slowly around the Aquatics Centre while the crowd stood and applauded.

"It shows hard work does pay off. Bob helped me get to where I am today," Phelps said.

"There are a lot of emotions going through my head right now but there are still other races. I am going to attempt to sleep tonight. I am not sure it will be possible.

"I put my mind to doing something nobody had ever done before and nothing was going to get in my way - to be the first Michael Phelps."  

(Agencies)