Michael Phelps is ending his Olympic career with 23 gold medals. 

On Saturday, Phelps picked up his 23rd Olympic gold medal as the United States won the 400-meter medley relay.

Nathan Adrian, Cody Miller and Ryan Murphy joined Phelps for his last race. They finished first with an Olympic record time of 3 minutes 27.95 seconds. 

What an incredible race to watch, but Phelps announced after that it would be his last.

Phelps retired following the London 2012 Summer Olympics. He was said to be tired of the sport at the time, but returned to the pool about a year and a half later.

He assured fans Saturday that while he has had an amazing time in Rio, the race with Adrian, Miller and Murphy would end it all. 

“This is over. This is it,” Phelps said in a Facebook Live event Saturday. “Tonight’s the last one, and there’s a lot to think about. Twenty-four years in the sport, and we are finishing up tonight.”

So what is next for Phelps? He says that he plans to do a lot of traveling and to spend time with family.

SLIDESHOW: Michael Phelps through the years