The #99 remounted but his battered machine had no right foot peg and he was forced to cruise back to the pit garage and a bitter DNF. Lorenzo is now equal third with Pedrosa in the world championship, 24 points behind Rossi.
Lorenzo's exit left Stoner to claim his first ever Jerez podium, at his and Ducati's toughest track, while Randy de Puniet rode a faultless race to claim an excellent fourth for the satelitte LCR Honda team.
Also celebrating was Marco Melandri, who matched Kawasaki's best MotoGP finish of last season in only his third race on the unofficial Hayate-run ZX-RR.
The Italian, riding in his 100th MotoGP event, battled countryman Loris Capirossi and American Colin Edwards for much of the race, getting the better of Capirossi's Suzuki by one second with Edwards less than half a second further back for Monster Yamaha Tech 3.
Andrea Dovizioso took eighth place despite running off track on lap eight and rejoining in 16th place, while Toni Elias (Gresini Honda) and Chris Vermeulen (Rizla Suzuki) completed the top ten.
Sete Gibernau's Jerez return netted eleventh for Francisco Hernando Ducati, while Yuki Takahashi helped erase his Motegi mistake by being the top rookie in twelfth position for Scot Honda.
James Toseland was a disappointing 13th for Tech 3, a fraction in front of Gresini's Alex de Angelis. Stoner's team-mate Nicky Hayden faired even worse - finishing the race over one minute behind Rossi and ahead of only Pramac rookie Niccolo Canepa.
Canepa's team-mate Mika Kallio retired with technical problems.
The French Grand Prix at Le Mans takes place on May 17.
Spanish Grand Prix:
4. de Puniet
14. de Angelis