LONDON For nearly a decade Ryan Lochte chased Michael Phelps in the pool, picking up bronzes to Phelps' golds. But all the while, Lochte has been closing the gap, second by precious second.
Lochte took away one of Phelps' world records, then his world championships.
On Saturday night, he raced past him on the stage Phelps has dominated since 2004.
Lochte crushed Phelps and the rest of the field to win the 400-meter individual medley at the London Aquatics Centre, finishing in a time of 4 minutes 5.18 seconds. Thiago Pereira of Brazil was second in 4:08.86, edging Kosuke Hagino of Japan, who won the bronze.
Phelps trailing most of the race and caught by Pereira and Hagino in the freestyle, one of his strongest strokes finished fourth, more than four seconds behind Lochte.
After the race, while Lochte lounged in the pool accepting congratulations from other swimmers, Phelps was the first one out of the water. He slowly walked across the pool deck, never glancing at Lochte.
Lochte's victory over Phelps was his first in four head-to-head races at the Olympics dating to 2004, and gave him a leg up at last in their decadelong rivalry. Lochte was 10 seconds behind Phelps in the 400 IM at the 2004 Olympic trials, but had cut that deficit in half by the time he won a bronze behind Phelps in Beijing.
This year Lochte beat Phelps by 0.83 second at the trials, and his victory Saturday night seemed to signal that the torch-passing complete.
Phelps was trying to become the first man to win gold in the same swimming event in three consecutive Olympics, but he is not out of chances. He is also the two-time defending champion in the 200 individual medley a race in which he will again face Lochte as well as the 100 butterfly and the 200 fly.
His defeat was his first in an Olympic final since 2004, a run of 12 straight gold medals that has made him the most decorated Olympic swimmer.
The showdown between Phelps, the world-record holder in the event since 2002, and Lochte, his colorful heir apparent on the U.S. team, was the first marquee matchup of the London Games, but it almost did not happen. Phelps qualified eighth in 4:13.33, coming from behind on the final lap to touch out Laszlo Cseh of Hungary, a two-time medalist in the event, in their preliminary heat. Lochte, meanwhile, coasted noticeably in the final meters of his event, finishing in 4:12.35 but allowing Chad Le Clos of South Africa to surge past him.
Cseh, the silver medalist four years ago and the bronze medalist in 2004, wound up ninth, which meant he would not be able to contend for a third consecutive podium finish.
''I would not have thought this would have been the result," Cseh said.
The preliminary times meant Phelps and Lochte, instead of staring at each other across a lane rope, were on opposite sides of the pool in the final, with Lochte in Lane 3 and Phelps in Lane 8. There would be no staredown, no "cat and mouse game," as Phelps once described their temptation in their many duels. More important, Phelps would have a harder time tracking all of his rivals from his position far to their right.
''The only thing that matters is getting a spot," Phelps said after the morning session.
Phelps' late dash into the final would normally have been the biggest story of the morning qualifying, but for once he shared the headlines. Dana Vollmer broke the U.S. record in the 100 butterfly preliminaries, finishing in 56.25 seconds, the fastest time in the world this year. Park Tae-hwan of South Korea, the defending Olympic champion in the 400-meter freestyle, advanced in his event only after he won an appeal of a disqualification in his preliminary swim in the event.
Park was reinstated after a video review. He was told of his false start after winning his heat, the third of four, in 3:46.68 seconds, which would have been good for fourth place overall.
Park's reinstatement knocked Ryan Cochrane of Canada out of the final. He had qualified eighth in 3:47.26.
Park looked shocked after the race and said that he did not know why he had been disqualified and that he would have to speak to his coach. A spokesman for FINA, the international governing body of the sport, said it was the technical commission's decision to overturn Park's disqualification.
Park's return to the eight-man field restored the excitement about an anticipated showdown between Park and China's Sun Yang.
In the final, Sun, the world-record holder in the 1,500-meter freestyle, put on a dominant performance, setting an Olympic record of 3:40.14 and becoming first Chinese man to win a gold medal in swimming. Park, the defending Olympic champion, was second in 3:42.06. The American Peter Vanderkaay won the bronze in 3:44.69.