Swimmer Michael Phelps, the all-time leader in career Olympic medals with 22, will carry the United States flag for the Opening Ceremony in Rio de Janeiro, the USOC announced Wednesday.

Phelps, who has won 18 gold medals, was chosen for the honor in a vote of Team USA athletes. It will be his fifth Olympics since making his debut at the 2000 Games in Sydney, Australia.

"I'm honored to be chosen, proud to represent the U.S., and humbled by the significance of carrying the flag and all it stands for," Phelps said. "For Sydney, I just wanted to make the team. For Athens, I wanted to win gold for my country. For Beijing, I wanted to do something nobody else had done. In London, I wanted to make history.

"And now, I want to walk in the Opening Ceremony, take it all in, represent America in the best possible way and make my family proud. This time around, it's about so much more than medals."

Phelps retired after the London Games and made a series of missteps in his personal life, including a second drunken-driving arrest in 2014. Since then, however, the 31-year-old went through six weeks of inpatient therapy, gave up alcohol, reconnected with his estranged father, got engaged and became a father for the first time with the birth of his son, Boomer.

He reversed his decision to retire, but insists this will be his final Olympics. Phelps will compete in three individual events in Rio and could be a member of all three relay teams, giving him a good chance to take his already-staggering medal haul even higher.

Phelps is just the second U.S. swimmer chosen to carry the flag in the Opening Ceremony, joining Gary Hall (1976, Montreal). He skipped the Opening Ceremony at the last three Olympics to rest up for the grueling 400-meter individual medley, which is held the next day.

The Opening Ceremony takes place Friday at Maracana Stadium in Rio.

The Associated Press contributed to this report.