The 16-year-old Ledecky, gold medallist at 800 metres at last year's London Olympics, was on course to break Pellegrini's world record of 3:59.15 but slipped off the pace in the final 100 metres to finish in a still-blistering time of 3:59.82.
Spain's Melanie Costa Schmid lifted the home support inside the hilltop Palau Sant Jordi by taking silver in 4:02.47 and Lauren Boyle of New Zealand was third in 4:03.89.
Olympic champion Camille Muffat of France finished a disappointing seventh.
(Reporting by Iain Rogers, editing by Toby Davis)
Share
