Phelps got there first, touching nine-hundredths of a second ahead of Lochte with the fastest time in the world this year.
The scoreboard from Omaha now reads: Phelps 2, Lochte 1.
"We were probably playing the cat-and-mouse game again," said Phelps, who won with a time of 1 minute, 54.84 seconds. "Then, of course, the last 50 we went crazy."
For Phelps, it was an emphatic message on his 27th birthday that he intends to turn his last Olympics into another major medal haul. For Lochte, it was a gutsy performance coming just a half-hour after he won the grueling 200 backstroke.
"The best thing about swimming is racing and stepping up against the world's best," Lochte said, sounding amazingly chipper before he returned for his third race of the night, the semifinals of the 100 butterfly.
Lochte finished third in his heat and set up one last race with Phelps on Sunday.
"Tonight was probably the most pain I've endured in a swimming competition," Lochte conceded.
Phelps, the two-time defending Olympic champion in the 100 fly, advanced to the final with another fastest time of 2012, powering away to win his heat in 51.35. Lochte tied for the sixth-fastest time in the semifinals (52.47), but this isn't one of his specialties. He'd need to pull a big upset to earn another Olympic event.
But, said his coach, Gregg Troy, "Ryan thrives on challenges."
Lochte seemed to have Phelps' number when he beat him twice at last year's world championships, then kept the dominance going with a convincing win on the first night of the trials in the 400 individual medley.
But Phelps edged Lochte in the 200 freestyle, and now he's got two wins in a row against the only swimmer who seems capable of preventing him from making another serious run at eight gold medals in London.
The two slapped hands while hanging on the lane ropes, then headed for the edge of the pool, fully aware the races that really matter are still to come.
"It feels good to be back on that side, but I'm sure that's not going to be the end of us going back and forth," Phelps said. "I'm sure there's going to be some more races like that over the next few weeks."
After he received his medals, the sellout crowd of more than 13,000 serenaded Phelps with a rendition of "Happy Birthday." Then he trotted around the deck to hug his mom and sister.
In other events on the sixth night of the trials, Jessica Hardy made up for the disappointment of missing out on the Beijing Games because of a failed drug test, winning the 100 freestyle. Seventeen-year-old Missy Franklin moved a step closer to having a seven-event program in London, finishing second behind Hardy in 54.15, while 11-time Olympic medalist Natalie Coughlin missed out on her last realistic chance at an individual Olympic race.
"That was all my heart in that race right there," said Hardy, who won with a time of 53.96.
Coughlin finished sixth, the last spot that can earn a possible berth on the 400 freestyle relay. But, at best, she would probably only get a morning swim at these games, a far cry from the six medals she won in China.
"It's a relief to make my third Olympic team," Coughlin said. "I'll be there to support my teammates and the rest of Team USA. I think that will be my bigger role this Olympics."
The torch has been passed to a new generation. Franklin also led the semifinals of the women's 200 backstroke, posting a time of 2:07.91. If she can finish strong Sunday and there's no indication the bubbly teenager is tiring in the least she'll have four individual events and all three relays on her Olympic agenda.
"The goal coming in was to make the team," Franklin said. "I could have never dreamed of doing seven events and the fact it's a possibility is unbelievable. But I've made the team, that's all that matters. Tomorrow is my favorite event and I can't wait to get out there and have fun with it."
Rebecca Soni locked up a second individual race in London, cruising to an easy win in the 200 breaststroke. She was slow off the blocks and made the first turn in fourth, but there was never any real doubt about this one. Soni surged to the lead on the second lap and steadily pulled away, winning with the fastest time in the world this year, 2: 21.13.
"I'm always a little nervous to push it too soon. I felt great the first 100, nice and long," Soni, who'll be looking to defend her 200 Olympic title. "I know I've trained the hardest I can so if I can hopefully bring home a gold, that would be amazing. If I can get back to my best time, that would also be great. I'm just going to have fun with it."
Micah Lawrence is heading to the Olympics for the first time, taking second place in 2:23.03. But 30-year-old Amanda Beard missed out on making a fifth Olympic team, fading to sixth (2:26.42).
"I can't be disappointed in myself," said Beard, who first came to prominence as a 14-year-old medalist at the Atlanta Olympics. "I'm very proud that I pushed myself. I'm 30 years old, so things aren't as easy as they were when I was younger. I still enjoy it. I'm still having fun. I'm not heartbroken."
Lochte got started on his busy night by winning the 200 back. The 27-year-old Floridian was sixth at the first turn, but he quickly moved toward the front and took the lead for good with a brilliant flip turn off the final wall. Pulling away, he won with a time of 1:54.54, second-fastest in the world this year behind Japan's Ryosuke Irie.
Tyler Clary took the second spot in 1:54.88, giving him two individual races at the Olympics. He has bounced back just fine from the disappointment of finishing third behind Lochte and Phelps in the 400 IM.
Phelps and Lochte are both assured of at least four individual events in London, and it would take a major upset for Phelps to miss out on a spot in the 100 fly.
At the start of the evening, Anthony Ervin was the top qualifier in the 50 freestyle semifinals with a time of 21.74. Nathan Adrian and Cullen Jones, who went 1-2 in the 100 free the previous night, also advanced to the Sunday final.
After going fastest in the morning prelims, the 31-year-old Ervin turned in another blistering performance from the middle lane. Never lifting his head, he went from one end of the pool to the other in 21.74 seconds, tied for the third-quickest time in the world this year.
Adrian tied with Josh Schneider for the second spot (21.81). Jones was next in 22.08.
Ervin was co-gold medalist in the 50 free at the 2000 Sydney Olympics but retired from swimming before he got a chance to defend his title. He returned to the pool last year.
"That was a best time," Ervin said. "That's what it's always about in swimming: chasing that best time."
Follow Paul Newberry on Twitter at www.twitter.com/pnewberry1963