Michael Phelps reacts after finishing second in the men's 100-meter butterfly final at the USA Swimming nationals in Irvine, Calif. Earlier in the day, he set a world mark in his preliminary heat. (Harry How/Getty Images)

It didn’t take long for the most decorated athlete in Olympic history to shake off a disappointing first day at USA Swimming nationals in Irvine, Calif.

After finishing seventh in the men’s 100-meter freestyle, Michael Phelps returned to the pool to swim to a world-best time in the men’s 100 butterfly in Friday morning’s preliminary heats.

His time of 51.17 seconds was four-hundreds of a second faster than his gold medal-winning swim at the 2012 Olympics and sent a clear message to the rest of the world: Phelps is back.

“This has kind of been my event and the event I love swimming the most,” Phelps said after his preliminary heat Friday morning. “I wanted to put up the fastest time in the world [last month at a meet in Athens].”

In the final, Phelps finished second, 0.01 behind California grad Tom Shields, who won the event in 51.29, tied with Olympic silver medalist Chad le Clos of South Africa for second in the world. Shields also won the 200 butterfly Thursday.

Phelps has won three straight Olympic gold medals in the 100 butterfly, and he is the current world record holder — a 49.82, set in 2009. Since ending his retirement in April, Phelps and Coach Bob Bowman have honed in on the event as Phelps considers a run at the 2016 Olympics in Rio, his fifth straight.

The 29-year-old had swum the butterfly in each of the four tuneup meets he had competed in ahead of nationals. Friday’s final was his 10th time contesting the event since his gold in London, and it allows the 22-time Olympic medalist to exhale after struggling in his first race in Irvine.

His race Friday morning was reminiscent of the performances he gave in the first 12 years of a career that started as a 15-year-old at the Sydney Olympics and peaked with eight goal medals in Beijing. But this time around is not about accolades or dominance; it’s about unfinished business, according to Phelps and Bowman. What that business is, they have yet to divulge.

The second-place finish guarantees Phelps a spot in the Aug. 21-25 Pan Pacific Championships in Australia alongside Katie Ledecky, Ryan Lochte and Missy Franklin, who qualified Wednesday.

Jack Conger, a three-time All-Met Swimmer of the Year out of Good Counsel, touched second in the “B” final in 52.55.

Kendyl Stewart, 19, beat Olympian Claire Donahue in the women’s 100 butterfly to win in 57.98. Cassidy Bayer, 14, of Nation’s Capital Swim Club, finished third in the “B” final (59.89).

In other events, Tyler Clary led from start to finish to win the men’s 400 individual medley over Phelps’s North Baltimore Aquatics Club protege-turned training partner Chase Kalisz, 4 minutes 9.51 seconds to 4:11.52. Clary’s time was the second fastest in the world this year. Andrew Seliskar, the All-Met Swimmer of the Year, finished fifth overall in 4:16.73 and less than two seconds out of earning a spot to Australia.

Elizabeth Beisel cruised to an easy win in the women’s 400 individual medley in 4:32.98.