Updated

Back on top. That's where Michael Phelps was, the winningest Olympian of all time in every way possible.

"This was a good day," he said.

Well, yeah.

Phelps broke the all-time Olympic medal record set by a Soviet gymnast five decades ago with a double-stroke of silver and gold Tuesday night at London's Aquatics Centre.

In what he swears is his last Summer Games, Phelps set the record by anchoring the United States to a runaway gold in the 800-meter freestyle relay, his 19th Olympic medal.

About an hour earlier, he was out-touched at the wall in what's historically been his best event, the first one he ever swam at the Olympic level 12 years ago in Sydney.

Phelps led all the way in the 200 butterfly until South Africa's Chad le Clos caught him on the last stroke, beating the American by .05 seconds with a time of 1 minute, 52.96 seconds.

It kept Phelps from becoming the first male swimmer to win the same event in three straight Olympics.

"Phelps is my hero and I love the guy. To beat him, I can't believe it," said le Clos, who won his first Olympic medal. "You don't understand what this means to me. This is the greatest moment of my life."

The finish mirrored his razor-thin victory over Milorad Cavic in the 100 fly four years ago in Beijing, when -- caught between strokes -- he touched .01 seconds faster than the gliding Cavic for one of his record-setting eight gold medals.

This time Phelps glided to the wall, beaten by a surge. But it didn't take long to wash away the loss.

Teammates Ryan Lochte, Conor Dwyer and Ricky Berens built the U.S. a lead of 3.88 seconds -- several body lengths -- after the first 600 meters and Phelps took over from there.

"We all wanted to do our part, we all wanted to make sure we got the biggest lead for him so when he dove in, he didn't have to work, he knew he was set solely on gold," said Lochte. "And we're happy that we did it."

France's Yannick Agnel, the swimmer who chased down Lochte in the 400 free relay on Sunday, made a dent swimming in the lane next to Phelps, but nothing more.

The U.S. finished in 6:59.70, beating the French by 3.07 seconds and winning the relay for the 16th time in the last 24 Olympics. China came in third and Germany was fourth.

Le Close set an African record in the 200 fly with a time of 1:52.96 and Japan's Matsuda Takeshi was third.

Charlie Houchin, Matthew McLean and Davis Tarwater also won gold medals after swimming in the morning relay heats. Along with Dwyer, they qualified the U.S. with the fastest time.

Phelps now has 15 gold medals -- he already had that record -- two silvers -- he won both of them here -- and two bronzes.

"The biggest thing I have always said is anything is possible. I have put my mind on doing something that no one else has done before," he said. "Being the first Michael Phelps it has been an amazing ride. This is still fun for me. I love being here."

He is 3-for-4 in races at the London Olympics, having finished off the medal podium for the first time since he was 15 when he placed fourth in the 400 individual medley on the first night, the race Lochte won in their first head- to-head duel.

The silver and gold combo on Tuesday gave him the all-time medal record over Larisa Latynina, who won 18 in the 1950s and 60s for the Soviet Union.

Phelps has won his 19 medals in three Summer Games and will swim in three more races here, including one more against Lochte.

"There are still other races," he said, "and that is what is on my mind right now. I am going to attempt to sleep. I am not sure if it is going to be possible."