Team USA takes gold in men’s 4×100 medley, Michael Phelps’ final race

Tom Pennington/Getty Images

If his statements about the Rio Olympics being his final Olympic Games, Michael Phelps went out on a high note.

Phelps, Ryan Murphy, Cody Miller and Nathan Adrian combined to set an Olympic record with a time of 3:27.95, and Murphy got them going in the first leg. Swimming the backstroke Murphy set world and Olympic records with a time of 51.85, and from there the Americans were in business. While Miller had to swim the breaststroke alongside Great Britain’s Adam Peaty, he was able to do enough to keep the U.S. in the top spot.

WATCH: Americans receive gold medals following 4×100 medley relay

Phelps and Adrian handled the final two legs, and in the end the quartet won America’s 1,001st Olympic gold medal just minutes after the women’s 4×100 medley team delivered No. 1,000.

Boosted by Peaty’s breaststroke leg Great Britain grabbed silver, with Australia taking bronze.

The United States won 33 total swimming medals in Rio, which matches their total in Sydney in 2000, and the 16 gold medals won matches their total from London four years ago. As for Phelps, he now has 28 career Olympic medals with 23 being gold. If this is indeed the end for Phelps, this was a good way to go out to say the least.

David Plummer, Kevin Cordes, Tom Shields and Caeleb Dressel will also receive gold medals after swimming in the preliminary heat.