Michael Phelps emerged the winner after a dramatic showdown with fellow USA teammate Ryan Lochte.
Phelps took gold in 200m individual medley Thursday, with Lochte taking silver.
The win makes Phelps the first swimmer to win gold in the same event in three straight Olympics.
Phelps clocked in at 1:54:27 while Lochte touched in at 1:54:90. Laszlo Cseh of Hungary won the bronze medal.
Lochte shook hands with his rival before crawling out of the pool for the last time at these games. In a symbolic gesture, he tossed his cap and goggles into the crowd, his work done. His final tally: two golds, two silvers, one bronze and a fourth-place finish — impressive, but undoubtedly shy of what he had predicted would be "my time."
About 30 minutes prior to the race, Lochte took the bronze in the 200m backstroke.
For most people, a career that already features three Olympic appearances and 10 medals (five gold) would be a rousing success, but next to a teammate with now 20 medals (16 golds), it can seem like a bit of consolation prize.
Even more than the medal count, Phelps' huge advantage in endorsement contracts shows just how much his personality loomed over Lochte and Team USA swimming. Lochte may have deals with Sprint, Gatorade, and Gillette, but his brand presence paled in comparison to that of Phelps, who endorses Sub Way, Under Armor, and Speedo, among many others.
But the tide seemed to turn in Lochte's favor early on in the games. He won the gold medal in the intensely difficult 400-meter individual medley. Phelps won this event in the past two Olympics.
Lochte also slid past Phelps in the 200m individual medley semifinals Wednesday.
Not that Phelps didn't do whatever it took to go out on top in what will be his final Olympics. "I feel confident," he said Friday. "Everything feels good."
Nothing is guaranteed in sports, and Lochte, who will turn 28 on Friday, cannot wait for 2016 - first Phelps-less Olympics in over a decade - to turn the corner.
"Right after Beijing, I had a four-year plan for getting here to London," he said. "I thought I could go a lot faster. I knew I could, just because of the training I've done. That's why I knew this was going to be my year."
His training regimen included the kinds of exercises normally seen in the World's Strongest Man competition: rolling large tires, tossing kegs, dragging chains. "It's going to pay off," Lochte said of his unusual program. "I just know it."
"That Strongman stuff, it helped me out a lot," Lochte said. "I knew no other swimmer was doing the stuff I was doing. I knew I had an edge. That gave me the confidence that I needed."