Mesa - Michael Phelps finished second on Thursday in his first final in 20 months, and the swimming superstar famous for his will to win said even a runner-up finish is fun now.
But Phelps said he'd done what he set out to do in his first competition since the London Games.
Lochte led at the 50m mark and held on to win in 51.93sec - second-fastest in the world this year - while Phelps was second in 52.13, matching the fourth-fastest time of 2014.
"I did what I wanted to do," said Phelps, adding he'd targeted a time of 52 seconds.
"The race was fun," he added. "The stroke was a little rushed tonight, it was way more relaxed this morning. But I swam a final again."
Lochte, not known as a 100m fly swimmer, said Phelps, as always, made him better.
"I probably wouldn't have gone that time if Phelps wasn't in there," Lochte said. "I'm glad he's back."
Phelps insists he isn't yet sure if his comeback will take him to a fifth Games at Rio in 2016.
"This is one meet, it's one race," Phelps said. "It's a long way whether I decide to continue or not. I'm doing this because I'm having fun, I'm just enjoying myself on this road, this process, this journey."
But news of his comeback sparked a sell-out at every session of this week's meet at the 1,200-capacity Skyline Aquatic Center in suburban Phoenix, Arizona.
Phelps's fellow swimmers were as thrilled as fans to see him back on the blocks.
That was particularly true of Lochte, who has had some memorable duels with his Olympic teammate.
"Racing against Michael is probably the hardest thing to do," Lochte said. "I love it.
"Him leaving, it kind of broke my heart a little. Racing against him is so much fun."
Phelps had made it look easy in posting the fastest time of the heats, although he said his pre-race butterflies recalled his age-group days.
By the time the final rolled around Phelps had his familiar game face on, seemingly oblivious to the cheers of the crowd.
"I was more serious tonight than I was this morning," Phelps said. "I knew what I wanted to do."
He wasn't too quick off the blocks, and said his turn was "probably the worst" of his career.
Coach Bob Bowman - who agreed about the turn - said the technical glitches could be fixed.
"I think that's a really good time to start with," Bowman said of Phelps's performance in an event in which he is the world record-holder and three-time reigning Olympic champion.
"It's totally expected," Bowman said of the mistakes. "He hadn't been in a race in two years until this morning... his timing was a little off at the start, then he scrambled to catch up, then he missed a stroke. By the time he got going it was kind of over."
Mostly Bowman is happy to see Phelps's enthusiasm for racing, and the excitement his presence in the meet has generated.
"It's fun to have him here. It's fun to see what he brought to the sport, and that's really what he wants to do... as long as he's enjoying it like he is, it's good for everybody."
Phelps, who planned to use Friday's 50m freestyle heats largely as a training exercise, seemed grateful for the welcome he received from fans, and taken aback by the welcome from his peers.
"I don't know what to say," he said. "This sport has given me so much and I don't think I can do enough to give back to this sport what I've received from it."