SPOILER ALERT: If you don't want to know what happened in Michael Phelps' last-ever Olympic race, read no further!
Phelps swam the butterfly leg of the 4x100 meter medley relay Saturday, and bid farewell to his Olympic career with a gold medal.
The celebrated athlete, 27, had his team in first place when he finished his leg, and Nathan Adrian held on to the lead and brought it home for the gold.
Phelps then shared an emotional group hug with his teammates.
The swimmer - who made his debut at the Sydney 2004 Olympics - says he will not be competing in four years time at the Rio de Janeiro games, making this swim the final Olympic event of his career.
Team USA beat out Japan who took the silver medal and Australia who picked up the bronze.
The young sportsman is no stranger to the winner's podium and has made history with 22 Olympic medals throughout his career - 18 gold, two silver and two bronze.