AP Sports Writer
IRVINE, Calif. (AP) -- Two events, two losses for Michael Phelps.
Tom Shields upset the three-time Olympic champion by a hundredth of a second to win the 100-meter butterfly at the U.S. national championships Friday night.
Shields touched in 51.29 seconds, tying for the second-fastest time in the world this year. Phelps was second in 51.30 -- still third-quickest in the world -- but he lost for the second time in two events in the biggest meet since he launched a comeback in April after 1 1/2 years in retirement.
"I'm somebody who can't stand to lose," Phelps said. "I don't care if it's by a hundredth or by five seconds. This will definitely motivate me."
Four of the seven quickest times in the world were recorded in the morning preliminaries, led by Phelps' 51.17. But he couldn't keep it together in the final against Shields, who won the 200 fly earlier in the meet.
"I knew I could make it a race, so I decided to go with confidence," said Shields, who was cheered on by family and friends from his hometown of Huntington Beach.
Phelps is still likely to earn a spot on the U.S. team for the Pan Pacific Championships this month, but he could have guaranteed himself a trip to Australia with a win in the event that he calls "my baby." He finished next-to-last in the 100 freestyle Wednesday.
The 18-time Olympic gold medalist has two events remaining this weekend.
Tim Phillips was third in 51.54. Ryan Lochte finished fifth in 52.21.
Phillips led after one lap, when Phelps was seventh. Known as a devastating closer, Phelps roared down the stretch, battling Shields every inch of the way as they swam next to each other.
"I knew in the last 15 (meters) it was going to be close," Shields said. "I took one look. Phelps swims with these ridiculously high elbows."
Phelps failed to take a final stroke and instead glided to the wall, where he got out-touched.
"It just cut all of my momentum," he said.
Bob Bowman, Phelps' coach, said, "It was pretty terrible."
Phelps didn't feel like his usual self walking on deck, while Shields confidently looked at the stands and then at his California teammates, who cheered him on during introductions.
"Normally I'm very relaxed and very ready," Phelps said. "Like Bob said, it's probably just because I'm not used to being in this kind of shape or this kind of feeling going into a meet."
Bowman suggested Phelps was nervous, which may strike some as odd because he's the most decorated Olympian, with 22 medals.
"It's not fitness, but it's the knowledge that he's getting up here against these guys who are on fire," the coach said. "He knows what he's done to get here and it ain't what he used to do to get here."
Phelps knows it, too.
"If I want to go 50-point then I need more -- I need more training, I need more endurance, I need to feel more comfort with my stroke," he said. "There are just a lot of things that need to happen. I understand that."
Elizabeth Beisel bounced back from some earlier bad luck to win her fourth national title in the 400 individual medley and earn a place on the Pan Pacs team. She was under American-record pace for much of the race before winning in 4:32.98 -- fourth-quickest in the world. She won a silver medal in the event two years ago in London.
Beisel slipped at the start of the 200 backstroke on Thursday and ended up sixth.
Maya DiRado finished second in the IM in 4:35.75.
In the men's 400 IM, Olympian Tyler Clary pulled away down the stretch to win with the world's second-fastest time of 4:09.51. He built a big lead during his specialty backstroke leg before defending champion Chase Kalisz drastically cut into it.
Clary regained his momentum on the final freestyle leg and Kalisz settled for second in 4:11.52.
"Chase was reeling me in like a cowboy," Clary said. "Just to be able to bring it home, I'm excited. He's someone who's obviously very valuable to swim against."
Kendyl Stewart upset Olympian Claire Donahue to win the 100 fly in 57.98 and book a trip to her first major international meet. Stewart overtook Donahue in the final 10 meters. Donahue touched in 58.03.
Copyright 2014 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.