Katie Ledecky surged to the wall.

Someone else was already there.

For the first time ever at the world championships, Ledecky knows what it's like to lose.

Bidding to become only the second female swimmer to win six golds at a single worlds, Ledecky settled for silver in the 200-meter freestyle Wednesday evening when Italy's Federica Pellegrini surged to a stunning victory on the final lap.

Pellegrini, the 28-year-old world-record holder, avenged a close defeat at the hands of Ledecky two years ago in Kazan, Russia. This time, it was the Italian touching first in 1 minute, 54.73 seconds.

Ledecky and Australia's Emma McKeon tied for the silver at 1:55.18.

While Pellegrini covered her mouth in delight and climbed atop a lane rope to celebrate, Ledecky merely stared at the scoreboard.

She had never seen a "2'' beside her name at the world championships.

But there it was in Budapest, where Ledecky's unbeaten streak in the second-biggest swimming competition after the Olympics finally came to an end.

She had been 12 of 12 over the last three championships, including three golds in this stately European capital. But her most audacious schedule yet — six freestyle events covering distances ranging from 100 meters (on a relay) to 1,500 (the grueling metric mile) — finally caught up with her along the banks of the Danube.

Missy Franklin will remain the only female swimmer to win a half-dozen events at worlds, while Ledecky can still take comfort in being the winningest female swimmer overall. Twelve golds leave her trailing only fellow Americans Michael Phelps and Ryan Lochte for the most victories.

And one silver, too.