NANTERRE, France >> Katie Ledecky capped another stellar Olympics by becoming only the second swimmer to win an event at four straight Summer Games, holding off Ariarne Titmus to win the 800-meter freestyle Saturday night.

It was Ledecky’s second gold medal in Paris and ninth of her remarkable career, which marked another milestone. She became only the sixth Olympian to reach that figure, joining swimmer Mark Spitz, track star Carl Lewis, Soviet gymnast Larisa Latynina and Finnish runner Paavo Nurmi in a tie for second place.

The only athlete to win more golds: swimmer Michael Phelps with 23.

“I put a lot of pressure on myself,” Ledecky said. “I’m just really happy that I could get the job done.”

Ledecky went faster than her winning time in Tokyo, touching in 8 minutes, 11.04 seconds. Titmus, the Australian star known as the “Terminator,” was right on her shoulder nearly the entire race, but Ledecky pulled away in the final 100.

Titmus, who beat Ledecky in the 400 freestyle, settled for silver at 8:12.29. The bronze went to another American, Paige Madden at 8:13.00.

“I knew that it was gonna be a tough race and I felt confident coming into it,” Ledecky said. “But I knew it was going to be tough no matter what, all the way down to the finish. So I just had to stick in the race, trust myself, trust my training, trust that I know the hungry side of that. And, yeah, I am just kind of relieved.”

Phelps had been the only swimmer to win the same event at four straight Olympics, taking gold in the 200 individual medley at Athens, Beijing, London and Rio de Janeiro.

Now he’s got company.

Ledecky claimed her first gold with a surprise victory in the 800 free as a 15-year-old at the 2012 Olympics.

Ledecky was thinking about that first gold before she dove in for No. 9 — which came 12 years to the day of her breakout performance in London.

“One is the one that kind of means the most to me,” she said. “I knew that August 3rd is the day I won in 2012 and I didn’t want August 3rd to be a day that I didn’t keep moving forward.”

No to worry. She has dominated the grueling race ever since — and isn’t done yet.

Ledecky has made it clear she plans to keep swimming at least through the 2028 Los Angeles Games.

“It’s not easy,” she said. “I’ll take it year by year, and we’ll see if I can keep giving everything I’ve got for as long as I have left in me.”

Another gold for Canadian teenager Summer McIntosh

Summer McIntosh stamped herself as one of the swimming stars of the Paris Olympics with her third individual gold medal.

The 17-year-old Canadian chased down American Alex Walsh and held off another U.S. swimmer, Kate Douglass, to finish in an Olympic record of 2:06.56.

Douglass grabbed the silver in the star-studded final at 2:06.92, but the Americans lost the bronze when Walsh, the silver medalist in this event at Tokyo who recorded a time of 2:07.06, was disqualified because she did not finish the backstroke segment on her back.

McKeown, who touched fourth, was bumped up to the bronze at 2:08.08.

It was a bitter blow for Walsh, whose younger sister, Gretchen, has won a gold medal and two silvers in Paris.

U.S. sets world record in mixed relay

The United States made up for a disappointing showing in Tokyo by setting a world record in the 4x100 mixed medley relay.

Ryan Murphy, Nic Fink, Gretchen Walsh and Torri Huske held off China for a winning time of 3:37.43, breaking the mark of 3:37.58 set by Britain when it won gold in the wild and woolly event’s Olympic debut three years ago.

With each team picking two men and two women, the U.S. and China both went with their male swimmers in the first two legs.

Murphy put the U.S. in front on the backstroke, China’s Qin Haiyang slipped past Nic Fink on the breaststroke, but Walsh put the Americans back in front on the butterfly before Huske held off Yang Junxuan to secure the gold.

Hungarian claims butterfly gold

Kristóf Milák of Hungary won the men’s 100 butterfly, chasing down three swimmers on the return lap.

Milák was only fourth at the turn, but he rallied to touch in 49.90. Canada grabbed the silver and bronze, with Josh Liendo finishing in 49.99 and Ilya Kharun next at 50.45.

Milák had failed to defend his Olympic title in the 200 butterfly, settling for a silver behind French star Marchand.

Milák claimed silver in the 100 fly three years ago, but he didn’t have to worry about the guy who beat him in that race. American Caeleb Dressel stunningly failed to qualify for the final, posting only the 13th-fastest time in the semifinals Friday.

Kharun added another bronze to the one he garnered in the 200 butterfly.