American superstar Michael Phelps ended his spectacular career fittingly, winning his 18th Olympic gold medal in the men's 4x100m medley relay in the final event of the London Games swimming programme.
Phelps extended his record total Olympic medal haul to a staggering 22 as the US preserved their unbeaten record in the race, winning in three minutes and 29.35 seconds.
James Magnussen powered home for Australia (3:31.58) to secure a bronze medal while Japan were second in 3:31.26.
Hayden Stoeckel, Christian Sprenger and Matt Targett had put Australia into fourth position with 100m to go before Magnussen clocked 47.22 to move them into the top three and claim his second medal of the Games.
He had taken silver in the 100m freestyle by one one-hundredths of a second earlier in the program.
Phelps, 27, swam his first Olympics in Sydney 12 years ago and is now retiring from swimming competition.
After a slow start to his final campaign, he finished strongly to end the meet with six medals; four gold and two silver.
He created history becoming the first male swimmer to win the same individual event at three Olympics with victory in the 200m medley, and he did it again in the 100m butterfly and the men's 4x100m freestyle relay.
NZN