Michael Phelps suffered a narrow loss to old rival Ryan Lochte in his comeback to competitive swimming on Thursday, but still showed enough to suggest he will be a force to be reckoned with.

Racing for the first time since he retired in a blaze of glory after the 2012 London Olympics with a staggering career total of 18 gold medals, Phelps won his morning heat in the 100-meter butterfly then finished runnerup to Lochte in a close final.

Lochte, a five-time Olympic gold medalist who beat Phelps to win the 400 individual medley at London, touched the wall first in 51.93 seconds with Phelps just behind in 52.13.