Cannot play media. Sorry, this media is not available in your territory.
The win was Rossi's 68th in MotoGP and extended his championship lead
Valentino Rossi's title hopes increased after he won the San Marino MotoGP and rival Casey Stoner failed to finish for the second successive race.
Australian Stoner, who started on pole despite fracturing his hand on Friday, misjudged a corner, lost control and crashed out on lap six in Misano.
That left Italian Rossi in the lead and the Yamaha rider roared home to extend his championship lead to 75 points.
Rossi's victory equalled fellow Italian Giacomo Agostini's record of 68 wins.
Britain's James Toseland had a good race and came home in sixth place after a thrilling battle with Loris Capirossi and Chris Vermeulen.
Rossi hailed his 'incredible' landmark
Rossi's team-mate Jorge Lorenzo clinched second and the final place on the podium went to Toni Elias.
But the story of the race was undoubtedly Stoner's crash, which virtually ends his hopes of retaining his title with still five races to go, and Rossi's astonishing record-equalling feat.
Pole-sitter Stoner got a storming start and quickly set about putting distance between himself and the rest.
Rossi slipped to third after being overtaken by Pedrosa, but regained his position on the second lap and set his sights on preventing Stoner from getting away.
We have a great advantage and we are one race closer to the title
He need not have worried as Stoner lost control of his front end only four laps later, snapping his handlebar in the crash, and his race was over.
It left a clear path for Rossi and he never look liked failing to make the most of his good fortune.
Toseland was delighted with sixth place
He told BBC Sport: "I have now won three races in a row - it is incredible. It was another great battle with Stoner - we know that Stoner is very fast.
"We have a great advantage and we are one race closer to the title. Last year, in these three races, I took nine points, this year 75.
"To win my 68th race in my hometown is incredible. I saw Giacomo Agostini before the race, and he was laughing. So I said to him I would try to win today."
Toseland climbed from ninth to sixth by lap eight and when he passed Andrea Dovizioso to move into fifth he was on target for his best finish in MotoGP.
The Tech 3 Yamaha rider could not keep Vermeulen at bay, though, and the Australian swept past with six laps remaining.
Toseland told BBC Sport: "I am enjoying the challenge. It is great to be back in the top six. Fifth would have been amazing, but we can push on from here."
Earlier, Spaniard Alvaro Bautista won the 250cc race from 11th on the grid while Gabor Talmacsi took the honours in the 125cc event, holding off young Briton Bradley Smith to win by five seconds.
Result from the San Marino MotoGP:
1. Valentino Rossi (Italy) Yamaha 44 mins 41.884 secs
2. Jorge Lorenzo (Spain) Yamaha 44:45.047 3. Toni Elias (Spain) Ducati 44:53.589 4. Dani Pedrosa (Spain) Honda 44:59.354 5. Chris Vermeulen (Australia) Suzuki 45:05.293 6. James Toseland (Britain) Yamaha 45:08.092 7. Loris Capirossi (Italy) Suzuki 45:08.708 8. Andrea Dovizioso (Italy) Honda 45:09.475 9. Marco Melandri (Italy) Ducati 45:15.053 10. Colin Edwards (U.S.) Yamaha 45:18.413 11. Sylvain Guintoli (France) Ducati 45:23.965 12. Shinya Nakano (Japan) Honda 45:25.692 13. Anthony West (Australia) Kawasaki 45:36.758 14. John Hopkins (U.S.) Kawasaki 45:37.038