Al Bello/Getty Images

Katie Ledecky capped off her Tokyo Olympics with a second gold medal.

The American swimmer took home gold in the 800-meter freestyle, an event in which she set the world record at the 2016 Rio Games. She is the first swimmer in history to win the event at three straight Olympics.

Ledecky touched the wall in 8 minutes and 12.57 seconds, finishing out in front of Australia’s Ariarne Titmus and Italy’s Simona Quadarella on Friday.

After the race, Ledecky confirmed that Tokyo would not be her last time in the pool.

“That was not my last swim. I am at least going to ’24, maybe ’28,” said Ledecky, referring to the upcoming Paris and Los Angeles Olympic Games.

Ledecky, 24, leaves Tokyo with four medals — two gold, and two silver — for ten total Olympic medals across three Games.