Michael Phelps Wins Gold at His Final Olympics Race

Michael Phelps at Olympics - Getty - H 2016
Al Bello/Getty Images

But then again, he also said he would retire after the 2012 London Olympics.

RIO DE JANEIRO (AP) — Michael Phelps closed out the Rio Olympics in the only way imaginable. Golden.

Phelps put the United States ahead to stay on the butterfly leg of the 4x100-meter medley relay and Nathan Adrian finished it off, giving the most decorated athlete in Olympic history his 23rd career gold medal Saturday night.

If that was the end, and Phelps insists it is, what a way to go. He has 28 medals overall, having won five golds and a silver at these Games.

"This is how I wanted to finish my career," said the swimmer. "Getting off the bus walking into the pool tonight, I pretty much felt myself starting to cry. Last time putting on a suit, last time walking out in front of thousands of people representing my country."

Most of the U.S. swim team was in the stands to watch Phelps' finale, including the biggest female star of the games, Katie Ledecky.

The 19-year-old Ledecky joked that she was proud to be part of Phelps' final Olympics — twice. He initially retired after the 2012 London Olympics, only to decide about a year later to return to the pool.

At 31, he sounds much more adamant when he says his swimming career really is over.

Phelps was elected a team captain for the first time in his career — this was his fifth Olympics — and truly seemed to enjoy being around his fellow swimmers. He was still the same ruthless competitor, but he also was willing to join in when some of his younger teammates made a "Carpool Karaoke" video at their final training camp in Atlanta.

Standing atop the medal podium for the 23rd time, listening to the "The Star-Spangled Banner" as he's done so many times before, Phelps teared up a bit and gave a little nod. Then he and his teammates grabbed a sign that said, "Thank You Rio."

His fans also took to Twitter to congratulate the athlete on what could be his last Olympic Games: