The career of the most medalled Olympian of all time has ended in gold.
Michael Phelps has swum the butterfly leg for the victorious USA 4x100 medley relay.
In his final swim for the United States, Phelps has won his 18th gold and 22nd medal of his career.
Japan has taken the silver with Australia in bronze.
The USA has won the women's event in a world record time of 3 minutes 52.05 seconds.
Australia has finished in second, with Japan claiming the bronze.
Photo: Getty Images