By Nicole Chrzanowski | Aug. 13, 2016, 10:19 p.m. (ET)
(L-R) Cody Miller, Michael Phelps and Ryan Murphy celebrate winning gold in the men's 4x100-meter medley at the Rio 2016 Olympic Games at the Olympic Aquatics Stadium on Aug. 13, 2016 in Rio de Janeiro.


RIO DE JANEIRO -- Michael Phelps closed the books on his illustrious swimming career the way he knew best: golden.

Ryan Murphy, Cody Miller, Phelps and Nathan Adrian continued the U.S. dominance in the 4x100-meter medley Saturday evening, giving the U.S. its ninth consecutive win in the event, dating back to the Los Angeles 1984 Olympic Games.

The team clocked in at 3:27.95, an Olympic record, beating out silver medalist Great Britain (3:29.24) and bronze medalist Australia (3:29.23).

Murphy took an early and world-record-setting lead for the U.S., finishing the backstroke leg in first by over a second. His time of 51.85 seconds was faster than the former world record, 51.94, set in 2009 by Aaron Peirsol.

Great Britain roped in Miller during the breaststroke leg but Phelps edged out the British during the butterfly leg, leaving open water for Adrian to secure the victory.

Phelps is the most decorated Olympian of all time, garnering 28 medals throughout five Olympic Games: 23 golds, 3 silvers and 2 bronzes. He officially retired at the conclusion of the relay.

Emotional at the conclusion, Phelps received a standing ovation from the crowd along with chants of "Michael Phelps."

Download the Team USA app today for breaking news, 2016 U.S. Olympic Team bios, videos and more.