Reclaiming the lead with his trademark butterfly stroke, the one most people first saw in Sydney a dozen years ago, Phelps won the 18th gold of a mind-boggling career in the 4x100-meter medley relay Saturday.
When it was done, Phelps hugged his teammates - Matt Grevers, Brendan Hansen and Nathan Adrian - before heading off the deck for the final time in his suit. He waved to the crowd and smiled, clearly at peace with his decision to call it a career.
And what a career it was!
Phelps retires with twice as many golds as any other Olympian, and his total of 22 medals is easily the best mark, too. He can be quite proud of his final Olympics as well, even though there were times he had trouble staying motivated after winning a record eight gold medals at the Beijing Games four years ago.
Bouncing back from a disappointing first race in London, a fourth-place finish in the 400 individual medley, Phelps wound up with more medals than any other swimmer at the games: four golds and two silvers.
Grevers had the Americans in front on the opening backstroke leg of the relay, but Kosuke Kitajima put Japan slightly ahead going against Hansen in the breaststroke. Not to worry, not with Phelps going next.
He surged through the water, handing off a lead of about a quarter of a second to Adrian for the freesytle anchor. The Americans won going away in 3 minutes, 29.35 seconds, just off their own Olympic record from Beijing. Japan held on for silver in 3:31.26, with Australia taking the bronze in 3:31.68.
Meanwhile, Oscar Pistorius made his anticipated debut, and the "Blade Runner" quickly made himself at home.
Pistorius, a double-amputee who runs on carbon-fiber blades, finished second in his 400-meter heat to earn a berth in the semifinals Sunday night. He finished in a season-best time of 45.44 seconds in front of a sellout crowd at Olympic Stadium.
"I've worked for six years ... to get my chance," said the South African, who became the first amputee to compete on the track at an Olympics. "I found myself smiling in the starting block. Which is very rare in the 400 meters."
As expected, Usain Bolt advanced to the 100-meter semifinals. But there was no sign of the dazzling talent that dominated the Beijing Games.
Bolt won his race in 10.09 seconds despite struggling to get out of the blocks. His reaction time ranked sixth of the eight runners in his heat.
"I stumbled on the start," the 25-year-old Jamaican said. "I really didn't do a lot of executing."
Yohan Blake, Bolt's teammate and training partner, was sharp in his Olympic debut, winning his heat in 10 seconds flat. Tyson Gay, Asafa Powell and 2004 Olympic champion Justin Gatlin also moved on.
While the sprint stars all advanced with relative ease, the U.S. men's basketball team was pushed - and then some.
Two days after running and gunning to a record-shattering 83-point win, the United States needed a strong finish from LeBron James to eke out a 99-94 victory over Lithuania.
The Americans trailed 84-82 with 5:50 to play, but James scored nine of his 20 points in the final four minutes to help the U.S. remain unbeaten.
"You want to get tested. The best teams want to be tested. We love the competition," James said. "I think we've got some of the greatest competitors in our league, in this world, so you want to have a game where you feel like you were tested, and we had that today."
Carmelo Anthony also had 20 points for the U.S. (4-0), which looked nearly invincible in thrashing Nigeria 156-73 on Thursday night and breaking several records.
Linas Kleiza scored 25 for Lithuania, which shot 58 percent and outrebounded the U.S. 42-37.
There was no such test for Serena Williams, who blew away the field at Wimbledon.
The American star became only the second woman to achieve a Golden Slam, routing Maria Sharapova 6-0, 6-1 in the most lopsided women's final in Olympic history.
The victory completed a remarkable run of domination by the No. 4-seeded Williams, who lost only 17 games in six matches en route to her first singles gold medal. She went 13-0 this summer at the All England Club, where she won her fifth Wimbledon title a month ago.
"I was so focused here," she said. "I remember I was serving and I was thinking: 'Serena, this is your best chance to win a gold medal. You're at Wimbledon, you're on grass, you play great on grass, pull it together, just win this.' And that's what I thought about."
Top-seeded Bob and Mike Bryan also won Olympic gold for the U.S., beating Michael Llodra and Jo-Wilfried Tsonga of France 6-4, 7-6 (2) in the men's doubles final.
Roger Federer will try to complete a career Golden Slam when he plays Andy Murray of Britain in the men's final Sunday.
Also Saturday, a dozen people opposed to the Syrian government staged a small demonstration to protest the presence at the Olympics of a Syrian equestrian rider whose father is under U.S. sanctions for supporting President Bashar Assad.
Ahmad Saber Hamsho told The Times of London in June that the Assad regime was "only protecting people from guys with weapons." Rebels have fought the regime for 17 months in an uprising that has claimed 19,000 lives and turned into a civil war.
Hamsho competed in the show jumping individual qualifier event, producing a clear round on a horse called Wonderboy. Protesters outside the gate at Greenwich Park handed out leaflets and "Freedom for Syria" stickers.
Hamsho said he was representing the country, not anyone in particular, in the equestrian ring. He said he didn't want to talk about Syrian politics and dismissed the protesters as "totally stupid."