From left, Germany's Paul Biedermann, France's Yannick Agnel , U.S. swimmer Ryan Lochte and U.S. swimmer Michael Phelps compete in the final of the men's 200-meter freestyle. (PHILIPPE LOPEZ/AFP/GETTY IMAGES)

The world has seen this sort of performance plenty of times from Michael Phelps. Trailing at the halfway point. A huge push off the wall, a massive surge underwater. Suddenly, the lead. A strong finish. A gold medal.

The world saw it again Tuesday night, only Phelps wasn’t the guy who did it.

Phelps was the guy who lost the lead.

Fellow American Ryan Lochte overtook Phelps, the defending Olympic champion, and held off Germany’s Paul Biedermann, the defending world champion, to win the 200-meter freestyle at the swimming world championships in 1 minute 44.44 seconds.

Phelps went out fast but couldn’t finish; he got the silver in 1:44.79. Biedermann claimed the bronze in 1:44.88, nearly three seconds slower than when he broke Phelps’s world record in the event wearing one of the now-banned speedsuits at the 2009 championships.

“It’s a big confidence boost,” said Lochte, who rarely competes in the event. “I guess it was my time tonight.”

The race left Phelps still seeking his first gold medal after two races here — he won a bronze in the men’s 4x100 relay Sunday. It also bolstered Lochte’s burgeoning reputation, hinting that he no longer is merely a capable rival for the world’s best swimmer, but perhaps a true challenger to that title.

Not that Phelps seemed quite ready to acknowledge that.

Phelps suggested during an introspective news conference well after the race that things would be much different once he got back to the serious training he has largely neglected since he won eight gold medals at the 2008 Summer Games.

“With the training I’ve had in the last six to eight months, that’s all I had in the tank,” Phelps said. “I would have loved to win but I think this is something that is going to help me next year. . . . The reason why I haven’t been able to swim as fast as I wanted to the last two years is: It’s all my fault.

“I know I can go faster than that, that I know for sure. . . . That time won’t win a gold medal next summer.”

Lochte, who won six gold medals at last year’s Pan Pacific Championships, had never beaten Phelps at a world championships or Olympic Games before Tuesday. Yet he absorbed the result as if he expected it all along, not so much cracking a smile as he pulled off his goggles and stared at the scoreboard. South Korea’s Park Tae Hwan got fourth in 1:44.92; France’s Yannick Agnel also went under 1:45 with his finish in 1:44.99.

Phelps, too, kept his cool. Two days after expressing deep disappointment with the U.S. relay team’s third-place finish, Phelps looked for the positive.

“I’m bummed I didn’t win,” Phelps said, “at the same time . . . . I’m headed in the right direction and very pleased.”

Phelps admitted to feeling a bit of satisfaction at beating Biedermann, who not only stole his world record at the 2009 worlds in Rome but also trounced him in the race.

“In ’09, I was the underdog and nobody knows me,” Biedermann said. “Now, it’s a little bit more difficult for me.”

Lochte executed his strategy perfectly. He anticipated that Phelps would go out hard and stayed close enough to strike. On the second turn, Lochte flew off the wall and swam that length faster than anyone else in the pool by more than 0.4 of a second. The field closed over the last 50 — including Phelps, who swam the last length 0.29 of a second faster than Lochte — but no one could close the gap.

Bob Bowman, Phelps’s coach, said Phelps followed orders perfectly, albeit a tenth of a second or so slower than he would have liked. But he simply didn’t fool Lochte, who speculated about how Phelps would approach the race the day before it took place.

“I know he wants that clear water,” Lochte said Monday night. “I’m going to move over to the lane line and draft off of him.”

Lochte joked with Phelps on the medal stand about his having to compete in the night’s 200 butterfly semifinals later — Phelps advanced to the final with the third-best time (1:54.85). The pair had also goofed around in the ready room, with both singing to the hip-hop playing on Phelps’s headphones. The music was so loud, Phelps said, Lochte could hear it standing next to him.

Lochte likely will face Phelps again in the 200 individual medley final on Thursday; both easily advanced in their heats Wednesday morning. Lochte, who went under Phelps’s 200 medley world record at the 2009 world championship, will enter that race as the favorite.

“I am definitely a completely different swimmer than I was in 2008,” said Lochte, who won two golds and two bronze medals at the 2008 Summer Games. “I’m a lot stronger and a lot smarter just going into my races.”