Michael Phelps, the most decorated Olympian of all time, has qualified for his fifth Olympic Games after winning the US 200m butterfly trials.
The 18-time gold medallist retired after London 2012 before returning to the pool in 2014.
He was arrested for drink-driving later that year and was banned from competitive swimming for six months.
Phelps, 31, said after qualifying: “That was probably harder than any swim I have had in my life.”
He is the first American male swimmer to make five Olympic teams.
Phelps said he felt the achievement was greater because of “the ups and downs we’ve gone through in and out of the pool to get to this point”.
Elsewhere, 400m freestyle world champion Katie Ledecky and Missy Franklin, a five-time medallist in 2012, both qualified for Rio after finishing first and second respectively in the 200m freestyle.