LONDON (AP) — Michael Phelps got off to a slow start in the London Games. Now the most decorated Olympian in history is set to sprint to the finish in the last individual race of his career.

Phelps will swim the 100-meter butterfly on Friday, with a chance to add a second threepeat to his resume. He won his first individual gold in London in the 200 individual medley on Thursday, making him the first man to win the same individual event at three consecutive Olympics.

"He didn't have it on his goal sheet, but for me that was important," Phelps' coach Bob Bowman said. "I always wanted him to do three just because that was cool."

Phelps can do it again in the 100 fly, going into the final with the fastest time of 50.86 seconds. He has no special strategy for the two-lap sprint.

"It's the 100," he explained. "You just kind of go for it and hopefully hang on."

Chad le Clos of South Africa, who out-touched Phelps to win the 200 fly, will be in the lane next to him as the second-quickest qualifier. Tyler McGill of the U.S. and Milorad Cavic of Serbia are also medal contenders.

"Phelps is out of our league. It's not fair that I'm talking for everybody, but I'm expecting something special tomorrow," Cavic said. "I think he's going to go 50.5. I'm going to have to go 50.9 to assure myself a medal."

Phelps' fourth and final Olympics started out with a loss to rival Ryan Lochte in the 400 IM — "the big downer" Bowman called it.

But things quickly began looking up. He has two golds and two silvers in five races, with the 100 fly on Friday and the 4x100 medley relay on Saturday before taking off his suit, cap and goggles for the last time.

"He's gotten himself together," Bowman said. "Physically he's good and it lets us know he's going to be pretty good tomorrow and finish up strong."

Phelps has been more forthcoming as retirement draws closer. His emotions are closer to the surface, too, with tears welling in his eyes on the medals podium.

"Going into the relay, it'll probably kick into my head more and more," he said.

He swam a dominating butterfly leg in the 200 IM on Thursday to win in 1:54.27 for his 20th career medal and 16th gold.

"It's a relief to win an individual gold," he said, smiling. "It's something pretty cool and special to threepeat."

His longtime rival, Ryan Lochte, settled for silver in 1:54.90, having split with Phelps in their two head-to-head races in London. Hungary's Laszlo Cseh took the bronze in 1:56.22.

"Ryan and I have had a lot of great races," Phelps said. "He has brought the best out of me many times."

After that win, Phelps rushed off to warm down in the diving well before returning for the 100 fly semifinals. Fittingly, he will go up against Cavic, the U.S.-born Serb, one last time in the final. Four years ago, Phelps edged Cavic by one-hundredth of a second to win the fly and preserve his run to a record eight gold medals.

"I'm going to give it everything I have and all the emotion that I have," said Cavic, who will be swimming his last Olympic race. "If I can do that it's going to give me that little extra I need to win a medal."

On the next-to-last night of swimming, Cesar Cielo of Brazil will be out to defend his Olympic title in the 50 free against a field that includes Americans Cullen Jones and Anthony Ervin, who won swimming's glamour event at the 2000 Sydney Games.

U.S. teammates Elizabeth Beisel and Missy Franklin qualified 1-2 for the 200 backstroke, where Kirsty Coventry of Zimbabwe will be a long shot to equal Krisztina Egerszegi's record of three consecutive titles in the event.

Defending champion Rebecca Adlington will have the support of a raucous home crowd in the 800 freestyle. She had the fastest qualifying time, with Lotte Friis of Denmark second.

Katie Ledecky, who at 15 is the youngest U.S. swimmer in London, has a shot to get on the podium as the third-fastest qualifier.

Lochte closed out his third Olympics having won five medals. He faded to bronze in the 200 backstroke behind winning U.S. teammate Tyler Clary and then finished second to Phelps in the IM.

"I wanted to get all golds in my events, but you know it didn't happen," Lochte said. "I'm going to have to live with that and move on and learn from it. Try not to make the same mistakes in the next four years."

"For the most part," he said, "I'm pretty satisfied."

The last chapter of the spirited rivalry between Phelps and Lochte overshadowed Rebecca Soni's successful defense of her 200 breaststroke title.

The American set her second world record in as many days with a time of 2:19.59, breaking her own mark of 2:20.00 set in the semifinals.

"It's been my goal since I was a little kid to go under 2:20," Soni said. "That's when my coach told me you're going to be the first woman to go under 2:19. I've been chasing it ever since. I'm just so happy."

Ranomi Kromowidjojo carried on the Dutch sprint tradition with a win in the 100 freestyle in an Olympic-record 53.00. Aliaksandra Herasimenia of Belarus claimed the silver in 53.38, while the bronze went to China's Tang Yi in 53.44.

Franklin was last at the turn and finished fifth, two-tenths out of a medal. The other U.S. swimmer, Jessica Hardy, finished last in the eight-woman field.

Clary won the 200 back in an Olympic-record 1:53.41. Japan's Ryosuke Irie took silver in 1:53.78. Lochte finished in 1:53.94.

"You always have big dreams in your head that you think you might be able to pull off something like that," Clary said. "The fact that it just came to fruition is something that hasn't even processed in my mind yet. The fact that I'm now an Olympic champion and Olympic-record holder is something that is very humbling. It's also very motivating for the next four years."