Michael Phelps has competed in the second event of his comeback and failed to advance to the 50-metre freestyle final.

The 18-time Olympic gold medallist used Friday's preliminaries at the Arena Grand Prix in Mesa, Ariz., to fine-tune his butterfly stroke instead of doing freestyle like everyone else in his heat. He finished seventh in a time of 24.06 seconds, missing out on the eight-man evening final.

Phelps finished 42nd overall, shutting him out of any of the three consolation finals, which involve the top 32 qualifiers.

Competing for the first time since retiring after the 2012 London Olympics, Phelps finished second in the 100 butterfly on Thursday, tying the fourth-fastest time in the world this year.

He won't compete on Saturday, the meet's final day. Phelps will head to high-altitude training in Colorado next month.