American Michael Phelps won the 18th and final Olympic gold medal of his career with a win in the 4x100m medley relay, before heading into retirement.
The 27-year-old swam the third butterfly leg at London's Aquatics Centre to help the United States past Japan in three minutes 29.35 seconds.