Michael Phelps (L) reacts after seeing his time wasn’t fast enough to beat fellow American Ryan Lochte (R) in the 200-meter freestyle final at the World Championships in Shanghai. (Michael Sohn/AP)
Photo gallery: Phelps vs. Lochte: Rivalry in bloom or changing of the guard?

But over the last two years, a worthy adversary has emerged among Phelps’ American teammates.

Ryan Lochte (1 minute, 44.44 seconds) used a late surge to narrowly edge Phelps (1:44.79) and win Tuesday’s 200-meter freestyle at the World Championships in Shanghai, continuing a recent string of dominance over his friendly rival.

At last year’s U.S. championships, Lochte — who specializes in backstroke and individual medley but has become a formidable opponent in freestyle as well — out-touched Phelps in the 200 IM and 200 backstroke. Lochte then went on to claim six gold medals at the 2010 Pan Pacific Championships. Phelps finished with five.

In Tuesday’s race, Lochte trailed at the 50- and 100-meter marks before powering past Phelps on the fnial turn to win the race.

“I knew Michael wanted to go out just to clean water, so I knew I had to be in striking distance and just work what I’m good at — those underwaters on each turn. It’s a big confidence boost. Hopefully this win will help me carry on through my other races this week.”

It’s been a rocky start to the week for Phelps whose team finished a disappointing third in the 400x100-meter freestyle relay. Phelps won his heat earlier Tuesday to advance to the 200-meter butterfly semifinals, scheduled for later this evening.

After 43 world records fell at the last World Championships, no marks have been reset so far in 2011 — due largely to the ban on full body length suits which went into effect early last year.

More World Championships coverage:

Phelps, Lochte clash at swimming worlds

Ryan Lochte hands Michael Phelps another loss in the 200 freestyle; Biedermann finishes third

Dana Vollmer wins 100 fly to take first gold for U.S.

Michael Phelps advances in 200 fly prelims on busy day at world championships