Yannick Agnel, the Olympic champion, led at 50.64 after 100 with Ryan Lochte in third. Agnel was up by nearly 1.5 seconds at 150 with Danila Izotov and Lochte in line for second and third.
But Conor Dwyer came from behind to surprisingly keep Lochte, the defending world champ, from medaling.
Agnel is coached by Michael Phelps‘ former coach, Bob Bowman.
Dwyer, 24, wins the first individual major international medal of his career.
Lochte, who wore lime green sneakers in his walk out to the deck, is scheduled for five more events in Barcelona. He swims in the 200 individual medley prelims Wednesday morning and semifinals Wednesday evening.
“I just tried to hit my last turn,” Dwyer told Universal Sports. “Michael (Phelps?) was texting me yesterday, ‘Stop taking it out like a little girl.”
Gold: Yannick Agnel (FRA) 1:44.20
Silver: Conor Dwyer (USA) 1:45.32
Bronze: Danila Izotov (RUS) 1:45.59
4. Ryan Lochte (USA) 1:45.64
5. Kosuke Hagino (JPN) 1:45.94
6. Robbie Renwick (GBR) 1:46.52
7. Cameron McEvoy (AUS) 1:46.63
8. Thomas Fraser-Holmes (AUS) 1:47.11