Michael Phelps is heading to back to Olympics.

Phelps, the most decorated athlete in Olympic history, held off a stiff challenge from Tom Shields to win the 200-meter butterfly at the U.S. swimming trials Wednesday night. Phelps whipped around to look at his time — a bit slower than he probably would’ve liked — and held up all five fingers on his right hand.

Yep, it’s Olympics No. 5, making him the first male swimmer to compete in that many Summer Games.

“I think that means the most tonight,” Phelps said, pausing to compose himself. “Just being able to finish how I want to is so important to me. Getting on this team is what I wanted to do.”

Phelps, who retired after the last Olympics but soon reversed his decision, took the 200 fly in 1:54.84 — far off the world record of 1:51.51 he set at the 2009 world championships while wearing one of the high-tech suits that have since been banned.

But there’s time to work on his speed between now and Rio. For now, Phelps is thrilled to be going back to the Olympics, where he’ll get a chance to add to the already staggering amount of hardware he’s accumulated at the last four Olympics: 18 golds and 22 medals overall.

advertisement | advertise on newsday

Going along for the ride this time is his first child, 7-week-old Boomer, who watched from the stands in the arms of his mom. The infant wore noise-canceling headphones adorned with American flags so he wouldn’t be startled by the huge roar that went up when his daddy touched the wall first.

Phelps reflected on his stumbles since London, most notably a second drunken driving arrest that prompted him to take a whole new look at his life. He reconnected with his long-estranged father, got engaged, gave up alcohol and committed himself to closing his career with a flourish.

“With everything that’s happened and being able to come back, that was probably harder than any swim I’ve had in my life,” Phelps said. “It’s probably more nerve-wracking here than it is at the Olympics.”