LONDON - Michael Phelps' last individual race at the Olympics ended like so many of the ones before it - with his hands on the wall before everyone else in the pool.
Phelps rallied to win the 100-meter butterfly on Friday for his third gold of the London Games and No. 17 of his career. The American was next-to-last at the turn but closed strong to finish in 51.21 seconds, just ahead of Chad le Clos of South Africa and Evgeny Korotyshkin of Russia.
''I'm just happy that the last one was a win,'' Phelps said. ''That's all I really wanted coming into the night.''
It was Phelps' third consecutive win in the event at the Olympics. He has said he will retire after the games, so his final Olympic race will be the 4x100 medley relay today.
Phelps' 21st medal was part of another big night at the pool for the U.S., led by a pair of teenagers.
Missy Franklin set a world record in the 200 backstroke for the 17-year-old's third gold in London. And right after Phelps was done, 15-year-old Katie Ledecky - the youngest member of the U.S. team - nearly broke the world record while winning the 800 freestyle, denying Britain's Rebecca Adlington a repeat before her home fans.
Florent Manaudou of France took the 50 freestyle in 21.34 seconds. American Cullen Jones grabbed the silver medal and Brazil's Cesar Cielo was third.
Phelps' race was only slightly faster than a Saudi woman's appearance in the judo tournament, but it was still being hailed as a victory for women in the Gulf kingdom.
Wojdan Ali Seraj Abdulrahim Shahrkhani became the first Saudi woman to compete at the Olympics when she lost her judo fight in 82 seconds. And she only made it to the mat after a compromise between Olympic organizers, the international judo federation and Saudi officials cleared the way for her to wear a modified hijab.
The crowd roared right before Shahrkhani's fight against Puerto Rico's Melissa Mojica. The Saudi, wearing judo dress and what appeared to be a tight-fitting black cap, looked tentative and cautious on her feet, and Mojica eventually grabbed Shahrkhani and flipped her onto her back, ending the match.
As she rose to her feet, Shahrkhani gently reached for her head to make sure the hijab was still in place. It was, and the two women bowed to each other and left to a loud ovation.
Afterward, the teenager walked with her father past journalists and TV cameras.
''I am happy to be at the Olympics,'' she whispered in Arabic, her brother, Hassan, holding both her arms. ''Unfortunately, we did not win a medal, but in the future we will and I will be a star for women's participation.''
Olympic Stadium was packed for the first time since the opening ceremony, and heptathlete Jessica Ennis gave the delirious crowd exactly what it was hoping to see.
Ennis finished the 100-meter hurdles in 12.54 seconds, the fastest time ever in the heptathlon's first event.
There were more stirring moments as Wimbledon, where Roger Federer was pushed to the limit in his pursuit of his first Olympic singles medal.
Like so many other times on Centre Court, he delivered.
Federer rallied past Juan Martin del Potro of Argentina 3-6, 7-6 (5), 19-17 to reach the final. At 4 hours, 26 minutes, it was the longest three-set men's match of the Open era.
''I was very tense at certain times,'' Federer said. ''I was seeing myself as a loser many times during the match.''