Michael Phelps lost out to Ryan Lochte in the 100 metre butterfly final in his comeback meeting at the Arena Grand Prix.

Phelps, the most decorated Olympian in history with 22 medals, finished second to Lochte in his first competition since he retired after the 2012 Olympic Games in London.

American Lochte finished in 51.93 seconds - the second-fastest time in the world this year - with his countryman Phelps close behind in 52.13 and Kenya's Jason Dunford third in 53.08.

Despite not claiming victory in his first final since coming out of retirement, Phelps was satisfied with the result.

"I swam a final again. I said I wanted to be around 52.0 and I would be completely happy with that," Phelps told ESPN.

"It's one meet; it's one race. It's a long way whether I decide to continue or not. This was awesome. I'm really excited about how things went. I do know what I need to do if I want to continue and swim faster."

Phelps swam quicker in the final than he did in his preliminary heat, which he won in a time of 52.84.

"My stroke was a little rushed tonight," Phelps added. "It was way more relaxed this morning."

Lochte admitted his fast time was as a result of the return of the 28-year-old Olympic 100m butterfly champion.

"I probably wouldn't have gone that time if Phelps wasn't in that pool with me. We push each other all the time," said Lochte.

"With what he's done for the sport of swimming and him leaving kind of broke my heart a little because I love getting on those blocks and racing him. Now that he's back I've got a big ol' smile on my face."

The next race for Phelps is 50m freestyle later today.