Michael Phelps (USA) competes in the men's 4x100m medley relay final during the London 2012 Olympic Games at Aquatics Centre. (Michael Madrid-USA TODAY Sports)
LONDON -- Was there any other way it could end?
Michael Phelps won gold Saturday night with his 4 x 100-meter medley relay teammates in the last race of the Olympic swim meet - and of his storied career.
The victory upped his medal count to an unsurpassed, and perhaps unsurpassable, 22 - 18 gold, two silver, two bronze.
The U.S. won with a time of 3:29.35. Japan was second and Australia third.
RELATED | 11Alive's complete Olympics coverage
MORE | U.S. Swim team parodies 'Call Me Maybe'
Phelps swam the butterfly leg of the event with teammates Matt Grevers (backstroke), Brendan Hansen (breaststroke) and Nathan Adrian (freestyle).
Even though he didn't compete in the final race, Lilburn's Eric Shanteau also received a gold medal in the event because he raced in the relay prelimaries. It's Shanteau's first Olympic medal.
PHOTOS | Georgia's Olympic athletes
RELATED | Follow Ga. Olympians on Twitter
Teams from Australia, Japan and South Africa entered the race as contenders. Australia won silver and Japan bronze in Beijing.
The USA has never lost the medley relay since it debuted as an Olympic sport in 1960. Australia won the event in 1980, when the USA boycotted the Moscow Games.