Katie Ledecky broke her own world record in the womens' 1500-meter freestyle at the world swimming championships in Kazan, Russia. Thirty minutes later, she was back in the pool again to qualify for the 200 meter freestyle final. (Jayne W. Orenstein/The Washington Post)

She wasn’t going to make it. She must have been too tired. In the end, it must have been simply too difficult a task. No shame in that. Fifty meters remained in the second heat of the women’s 200-meter freestyle semifinals, and nobody at Kazan Arena — not the screaming fans, not the Team USA members assembled to watch their most unbeatable teammate, not the international media horde that long ago ran out of superlatives for the phenom before them — would have blamed Katie Ledecky, in seventh place at the final turn, for admitting defeat and cruising home.

She deserved credit just for attempting the impossible — a 1,500-meter/200-meter “double” on the third day of the FINA World Swimming Championships, with less than 30 minutes in between. She had set another world record in that 1,500, her second of the meet and ninth of her career. So what if she failed to advance in the 200, a race she isn’t really engineered to swim? Bravo for dreaming big. Nice try, kid.

And then — here she came. And there she went, past one rival, then another, then another, and another. Kicking furiously with rubbery legs, pulling herself forward with aching arms, Ledecky surged in that final 50, touching the wall in third place, good for sixth overall in the semis, advancing — with a quarter of a second to spare — into Wednesday night’s final.

“It was a little nerve-racking being behind quite a few of those girls. But I just knew I had to finish hard and get my hand to that wall,” said Ledecky, an 18-year-old Bethesda native who has become the most dominant female swimmer in the world. “I just knew I could get my hand to the wall before a couple of those girls in my heat.”

The history of swimming is full of famous athletes pulling off brilliant individual, single-day performances, many of them realized on Olympian stages, with multiple medals at the end. None, it is safe to say, included a sixth-place finish in a semifinals.

And yet, there is a unique place in that history for what Ledecky accomplished Tuesday. Though no records exist, a successful 1,500/200 double is considered to be unprecedented at this level, if only because few swimmers even contest both events — the former a nearly mile-long endurance race of 30 laps, the longest event in international pool swimming, and the latter a breakneck sprint of just four laps. There are distance swimmers, and there are sprinters. You are either one or the other.

“We’ve been fortunate to have some really outstanding performances in swimming, but today has to be in an exclusive list of the best ever,” said Chuck Wielgus, CEO of USA Swimming. “To destroy a world record, then turn around . . . for one of the most talent-rich races and finish so strong to advance to the finals shows how gutty, smart and talented she is.”

Ledecky pulled it off Tuesday with exactly 29 minutes in between, with a world record in the 1,500 — a time of 15 minutes 25.48 seconds, shaving more than two seconds off the record she had set just the day before in the prelims — and a closing 50-meter time of 29.33 in the 200, the second-fastest closing lap, by three-hundredths of a second, of the entire semifinals field of 16.

She saved her legs during the 1,500, barely kicking at all as she plowed through lap after lap, all but the first and the last clocking in between 30.64 and 31.18. She turned it on for the 30th and final lap, a 29.02. Her celebration of a second gold medal for the week, and a second world record in two days, was a single fist-pump in the direction of her family in the stands, and a smile. Anything more would have required too much energy, none of which she could spare.

It was 6:24 p.m. Kazan time when she pulled herself out of the pool. She used a back exit to move from the competition pool to the warm-down pool, making it there in about 90 seconds. She swam about 700 meters at an easy, loping pace — a Lamborghini coasting down a hill — and was out of the pool again at 6:38 p.m, toweling off, donning a heavy parka to keep her muscles warm, and making her way, guided by Team USA manager Andy Kershaw, to the “ready” room where the swimmers wait to enter the deck right before their race. It was 6:40 now.

In the ready room, Ledecky rested in a chair and watched the first semifinal heat of the 200 — it went off at 6:46 p.m. — gleaning from it that she would probably need something under 1:57 to advance. Her legs felt “like jello,” she would say later. “I was surprised,” she said, “because I barely kicked in the mile.”

She was introduced to the crowd at 6:52 p.m., waving feebly and tossing off the parka. The starter’s horn sounded at 6:53 p.m., exactly 29 minutes after the end of the 1,500.

Almost immediately, a burning pain shot through her arms.

“My legs felt better than my arms,” she said, “so I knew I had to kick.”

She was eighth out of eight swimmers after the first 50 meters, eighth still after 100 meters, and seventh after 150. At that point, she knew more or less where she stood.

“I just remember flipping at the 150 [mark] and seeing two girls on my left were ahead of me, and knew Missy [Franklin] was ahead of me,” she said. “So I knew I had my work cut out for me in the last 50. I couldn’t see myself passing anybody except the girl next to me, and I just hoped it was enough.”

When she touched the wall for the second time that night and the third time that day — her 200-meter qualifying heat Tuesday morning a distant memory by that point, even though she led the qualifying — she knew almost immediately that she had done it. She hung wearily on the lap-lane rope, mustered enough energy to hug Franklin, her teammate.

“I just wasn’t afraid to fail tonight,” Ledecky said. “I thought I had nothing to lose, and just felt like I could race hard. . . . I knew I was going to have this double today, and I knew that I was prepared for it. And yes, it did hurt a lot, but I got through it, and it feels really, really good right now.”

There was still a medal ceremony for the 1,500 to follow. She stood on the top perch of the platform, smiled as the gold medal went around her neck, put her hand to her heart and mouthed the words of the “Star-Spangled Banner.” But her voice dropped out from time to time, her mouth going still. Down off the platform, flanked by the silver and bronze medalists, she managed a smile for the official photographer.

Then, it was back to the pool for another 28 minutes of warm-down. Finally, she pulled herself out of the pool for the last time. It was 7:39 p.m. Her next encounter with water would be out of a plastic bottle, followed by a shower head.

Many people ask Ledecky how she does what she does: Where does she muster the stamina? Where does that final reserve of energy — the one that let her go a 29.30 in her final 50 of the night, when almost anything less would not have been enough — come from? What does she think about in the water? Some of it can be answered. Most of it cannot. She is a once-a-generation talent, and a workhorse of inexplicable, unsurpassed drive.

As she swims, she has said, she listens to the water, to the rhythm of her chop — in order to lock her into her chosen pace. She thinks mostly about how many laps remain, and what her race strategy is at that specific stage.

Occasionally, though, her mind drifts, even in races — even in a world championship. On Tuesday, in the middle of a 1,500 that would result in a world record — stretching to 17 seconds the total time she has shaved off the mark in the past two years — she thought about her late grandfathers.

Edward Hagan, father of her mother, Mary Gen, was a Purple Heart and Silver Star recipient from World War II, a physician and a swimming advocate whose home town of Williston, N.D., named not one but two community pools after him. Jaromir Ledecky, father of her father David, was a Czechoslovakia native who came to America in 1947 to study English, taking his first job as a dishwasher at a Howard Johnson’s off Exit 9 of the New Jersey Turnpike and later becoming an economist with a PhD from NYU.

“I don’t do this very often,” Katie Ledecky said, “but at one time I did think about both my grandpas. Both have passed away, but I know both my grandmas are watching the whole championships very closely back home.”

The thoughts of her grandfathers, she said, occurred only once Tuesday, and only briefly. But when she thought of them, she said, “I dug deep.”