Irvine - Michael Phelps departed the US Swimming Championships without a title after a runner-up finish to Ryan Lochte in the 200m medley on Sunday, but with renewed resolve to return to the pinnacle of the sport.
The top two swimmers in the history of the event shrugged off indifferent results earlier in the meet to deliver an exciting battle, Lochte charging to a wire-to-wire victory in 1:56.50, second-fastest time in the world this year.
Phelps, whose 18 Olympic gold medals include three 200m medley triumphs, came on strong on the closing freestyle leg, but settled for second in the year's third-best time of 1:56.55.
"Definitely better than where I was at the beginning of the meet," said a delighted Phelps. "I got in the water and I was actually able to put together a full race."
Only Japan's Kosuke Hagino has gone faster this year, with a time of 1:55.38.
The three could meet in less than a fortnight at the Pan Pacific Championships in Gold Coast, Australia, although Phelps and Lochte have yet to confirm their program for that meet.
Just getting to PanPacs was a priority for Phelps, who returned to competition in April after a retirement that lasted nearly two years.
In his biggest meet since his return, Phelps botched a turn in the 100m freestyle to finish seventh, was out-touched by a fingertip in one of his signature events, the 100m butterfly, and finished sixth in the 100m backstroke.
Phelps did show a flash of some of his old brilliance with a world-leading time in the heats of the 100m butterfly.
He admitted feeling uneasy in the big races, knowing that he lacked a solid training base.
But the disappointments have only shown what he needs to do to further a comeback that started as a way to shed unwanted pounds, but is now clearly aimed at again becoming an international force.
"I know what I have to do," he said. "Some of these races really upset me."
Phelps, however, says he's still having fun - his mantra since returning to competition in April. That's because the drive to train and compete is all from within.
"I'm going to have to work because I want to," he said. "That's the reason I'm here and the reason I'm swimming."
Lochte, who long swam in the shadow of Phelps but who counts an impressive five gold among his 11 Olympic medals, has endured a difficult year of his own, missing training time after tearing a ligament in his knee.
"My confidence wasn't there because I always relied on my training, but this year I haven't done that training," he said.
Lochte had come up short in his previous races here, finishing second in the 100m free, third in the 100m backstroke and fifth in the 100 butterfly.
"This is good for me, to get a win under my belt," said Lochte, who strode to the podium in a pair of glittery high-top shoes sprouting wings on the side.
Now they'll hope a few more days' training will have them swimming faster at the PanPacs, the August 21-25 meet featuring Australia, New Zealand, the United States, Canada, Japan and Brazil.
Results from the meet will determine the US team for the 2015 world championships in Russia.
Twelve-time Olympic medalist Natalie Coughlin won't be making the trip after finishing sixth in the 50m freestyle, won by 18-year-old Simone Manuel in 24.56. Ivy Martin was second in 24.72 and Madeline Locus third in 24.81.
Anthony Ervin, a 50m free Olympic gold medalist back in 2000, surprised Nathan Adrian in the men's 50m free, winning in a blazing 21.55.
Adrian, the reigning Olympic 100m free champion, was second in 21.69 and Olympic silver medalist Cullen Jones was third in 21.83.
"Putting yourself on the team, that's just a stepping stone on the way to eventual real racing in Australia," the 33-year-old Ervin said.
In other events Sunday, Melanie Margalis won the women's 200m individual medley with a time of 2:10.20, third-fastest in the world this year.
Katy Campbell overtook early leader Danielle Valley to win the women's 1 500m freestyle in 16:17.59 and Michael McBroom won the men's 800m free in 7:49.66.
Results of finals on Sunday, the fifth and final day of the US SwimmingChampionships:
1. Anthony Ervin 21.55sec, 2. Nathan Adrian 21.69, 3. Cullen Jones 21.83, 4. Josh Schneider 21.88, 5. Matt Grevers 22.25, 6. Jimmy Feigen 22.32, 7. Seth Stubblefield 22.34, 8. Mark Weber 22.62
1. Michael McBroom 7min 49.66sec, 2. Matt McLean 7:55.78, 3. Michael Klueh 7:58.13, 4. Arthur Frayler 8:01.38, 5. Janardan Burns 8:01.43, 6. Ryan Feeley 8:01.96, 7. Liam Egan 8:02.98, 8. Jacob Ores 8:03.22
200m individual medley
1. Ryan Lochte 1:56.50, 2. Michael Phelps 1:56.55, 3. Tyler Clary 1:57.94, 4. Conor Dwyer 1:58.03, 5. Chase Kalisz 1:58.85, 6. Josh Prenot 1:59.09, 7. Kyle Whitaker 1:59.44, 8. Tynan Stewart 2:01.25
1. Simone Manuel 24.56sec, 2. Ivy martin 24.72, 3. Madeline Locus 24.81, 4. Madison Kennedy 24.83, 5. Abbey Weitzeil 24.91, 6. Natalie Coughlin 24.97, 7. Margo Geer 25.06, 8. Maddy Schaefer 25.07
1 500m freestyle
1. Katy Campbell 16min 17.59sec, 2. Danielle Valley 16:19.83, 3. Lindsay Vrooman 16:22.83, 4. Gillian Ryan 16:25.74, 5. Leah Smith 16:27.37, 6. Kaitlin Pawlowicz 16:28.31, 7. Isabella Rongione 16:32.25, 8. Anina Lund 16:36.89
200m individual medley
1. Melanie Margalis 2:10.20, 2. Maya DiRado 2:10.57, 3. Caitlin Leverenz 2:11.05, 4. Meghan Small 2:11.83, 5. Elizabeth Beisel 2:12.46, 6. Karlee Bispo 2:12.66, 7. Celina Li 2:12.86, 8. Madisyn Cox 2:15.02