Correction: An earlier version of the article misstated the name of Katie Ledecky’s high school. She attends Stone Ridge School of the Sacred Heart in Bethesda. This version has been corrected.

Bethesda’s Katie Ledecky smiles after receiving her gold medal for the women's 1500-meter freestyle at the world championships in Barcelona. (Manu Fernandez/AP)

Before she could legally drive, Katie Ledecky won an Olympic gold medal. Now, a month before she begins her junior year of high school, she has a world record, too.

Ledecky, the teenage swimming sensation from Bethesda, swam the fastest time ever in the women’s 1,500-meter freestyle Tuesday at the world swimming championships in Barcelona, a performance that earned her second gold medal of the meet and further cemented her place as one of the sport’s most remarkable talents.

“This really means the world to me,” Ledecky said by phone shortly after her swim.

Ledecky’s time of 15 minutes 36.53 seconds beat the old mark — set by Kate Ziegler of Great Falls in 2007 — by more than six seconds. Defending world champion Lotte Friis of Denmark swam evenly with Ledecky for the first 1,300 meters of swimming’s longest race, but couldn’t hold off the 16-year-old over the final four lengths of the pool, even though Friis, too, bettered Ziegler’s old mark. Ziegler attended O’Connell High and was the 2004-05 and 2005-06 All-Met Swimmer of the Year.

“We pushed each other the whole way,” said Ledecky, the 2012-13 All-Met Swimmer of the Year. “I knew we were going pretty fast, and I figured whoever touched the wall first was going to get the world record. I was just trying not to make a move too early on, not to wait too long. I just had to judge it as I swam.

“Each lap I would just try to inch my way out, but she responded pretty well each time. So with 200 left, I really let it all out.”

Ledecky adds her victory in the 1,500, an event that is not staged for women at the Olympics, to the gold she won in the 400 meters Sunday night. Ledecky’s performance also seemed to spur on the American team, which won three golds, two silvers and a bronze Tuesday night alone.

“It was motivating watching Katie destroy the world record from the ready room,” Matt Grevers, who won gold in the men’s 100-meter backstroke, told reporters in Barcelona. “That really got us psyched.”

Ledecky set herself up for Tuesday by winning the 400, in which she nearly set a world record as well.

“That gave me the confidence for the rest of the week,” Ledecky said, “and I just used the momentum from that race to carry me into the mile.”

The 1,500, Ledecky said, “is my hardest race, definitely.” But she is now – even though she hasn’t started her junior year at Stone Ridge School of the Sacred Heart in Bethesda – already among the best American distance swimmers of all time. She has plenty of time to put herself alongside Janet Evans, who won three Olympic golds and held world records in distance events.

But in her first remarks to reporters after Tuesday’s victory, Ledecky mentioned her respect for Ziegler, an Olympian in 2008 and 2012. She reiterated those sentiments by phone.

“I watched her race so much when I was younger,” said Ledecky, a member of the Nation’s Capital Swim Club that has produced former world record holders Tom Dolan, Ed Moses, Mark Henderson and Mike Barrowman. “I did really look up to her. I wanted to keep that record in Potomac Valley,” referencing USA Swimming’s governing body in the Washington region.

Ledecky now has a day off from competition before she returns to the pool for preliminary heats of the 4x200-meter freestyle relay on Thursday. She’ll be back to individual races Friday with heats of the 800-meter freestyle — the event in which Ledecky won gold in London — with the final Saturday night. Ledecky’s gold medal-winning time in the 800 was the second-fastest in history, so it’s possible, with another year’s maturity, that another world record could fall this week.

“We’ll see,” Ledecky said. “I’m just excited to race it again on the international stage.”