However Stoner dug deep and, with Melandri also struggling for grip, repassed the Italian for fifth place with four laps to go and just held off both the Gresini Honda rider and Rizla Suzuki's
John Hopkins at the chequered flag.
Fifth was Stoner's equal worst finish of the season, but Rossi's non-score means that the 21-year-old now sits 32 points in front of Rossi heading into next weekend's US Grand Prix.
Prior to Pedrosa's German triumph Laguna Seca 2006 was the scene of Repsol Honda's last grand prix victory (with Hayden) and the young Spaniard was unusually emotional at taking his long waited third premier-class victory - his voice breaking as he spoke to the press. Dani had crossed the line over 13 seconds ahead of Capirossi and was simply in a class of his own this afternoon.
Capirossi, currently locked in a Ducati-Kawasaki-Suzuki 'love triangle' for next season, was almost as delighted at finally returning to form, while Hayden's second podium of the season - despite a nightmare weekend - will boost his confidence heading to his home round, which he has won for the past two years.
Meanwhile,
MotoGP's pole jinx remains intact, with Stoner - like all previous 2007 pole position holders - failing to take the win.
German Grand Prix:
1. Pedrosa
2. Capirossi
3. Hayden
4. Edwards
5. Stoner
6. Melandri
7. Hopkins
8. West
9. Hofmann
10. Fabrizio
11. Vermeulen
12. Roberts
13. Tamada
14. Checa