The United States broke their own world record to win the men's 4x100 metres medley relay on Sunday to provide Michael Phelps with the perfect way to celebrate his eighth gold medal.
Phelps, who swam the butterfly leg, joined backstroker Aaron Peirsol, breaststroker Brendan Hansen and freestyler Jason Lezak to win in three minutes, 29.34 seconds, shaving 1.34 off the world record the Americans set at the 2004 Athens Olympics.
It was the third relay gold medal Phelps won in Beijing, all in world record time, and helped him break Mark Spitz's record of seven golds from the 1972 Munich Olympics.
The U.S. completed a sweep of all three men's relays but only after Lezak produced an incredible anchor leg swim in last Sunday's 4x100 freestyle final to pip France and keep alive Phelps's quest to win eight golds.
he U.S. were overwhelming favourites to win the medley relay and were always in control, despite dropping to third after the breaststroke and facing a late challenge from Australia, whose anchor man was 100 freestyle world record holder Eamon Sullivan. Sullivan managed to get within half a body length of Lezak but the Australian men, who failed to win a single swimming gold for the first time since 1976, took the silver in 3:30.04.
Japan were third in 3:31.18 in what was possibly Kosuke Kitajima's last Olympic appearance after he completed the breaststroke double for the second time to confirm his status as Asia's greatest swimmer.
The New Zealand team were fifth.