Michael Phelps secured career Olympic gold medal No. 23 alongside Ryan Murphy, Cody Miller and Nathan Adrian by winning the 4x100m medley relay on Saturday night.

The American squad raced to an Olympic record time of three minutes, 27.95 seconds. Murphy broke Aaron Peirsol’s 6-year-old world record in the 100m backstroke during his lead-off leg, clocking 51.85 and shaving 0.09 off the old record.

Great Britain, the 2015 world champions in the relay, claimed the silver while Australia took the bronze.

Phelps said earlier Saturday on a Facebook live broadcast that the race is the last of his storied career. Historically, the U.S. men have won gold in this event every time they’ve entered, dating back to the event’s debut in 1960.

Phelps has won a medal for his participation on this relay every Olympic Games since 2004. Take a look:

Murphy, making his Olympic debut in the Rio Games, swept the 100m and 200m backstroke gold medals. Miller, also making his first Olympic appearance in 2016, earned a bronze medal in the 100m breaststroke. Adrian picked up two individual bronze medals in the 50m and 100m freestyles in Rio and won gold alongside Phelps, Ryan Held and Caeleb Dressel in the 4x100m freestyle relay earlier in the week.

David Plummer, Kevin Cordes, Tom Shields and Dressel qualified the U.S. a spot in the final; they’ll be able to collect gold medals, too.

The U.S. has won every men’s 4x100m freestyle relay that they have contested, dating back to the event’s debut in 1960.

Join our Newsletter for the latest news right to your inbox