By now Pedrosa was pushing hard to find a way past Melandri, but the 20-year-old rookie was unable to try a bottom of the hill outbraking move - used to great effect by his rivals - almost certainly because he had fallen at that exact point on Saturday morning. Instead, the double 2006 race winner used a tight line through the twists that start the lap to get ahead of Marco on lap 26… only to be repassed at the bottom of the hill.
Worse still for Pedrosa, Melandri had forced him wide - allowing Hayden to also move ahead - and Marco wasn't hanging around; out-braking Rossi into turn one to topple the M1 rider from the lead for the first time in 15 laps.
But while Rossi still had two laps to respond, time was running out for fourth placed Pedrosa - now desperate to pass Hayden. Dani again tried to take a tight inside line through the twists that start the lap, but Hayden held firm - despite Pedrosa's front wheel rubbing on his leathers - and the Spaniard was forced to lift.
At the end of that penultimate lap, Rossi retook the lead from Melandri at the bottom of the hill - then pulled tight to the inside all the way along the start-finish start to defend his position as the quartet charged into the first turn for the final time.
It worked, but it was still anyone's race as they stuck wheel-to-wheel around the rest of the final lap and then accelerated downhill towards the first of the two left handers that end the lap. The Hondas were climbing either side of Rossi through those turns, Melandri trying the outside and third placed Hayden the inside - but The Doctor didn't crack and won his fourth race of the season by just 0.145secs from Melandri, with Hayden 0.266secs from victory and fourth placed Pedrosa 0.307secs behind the #46.
It was surely one of Rossi's greatest rides - the next best Yamaha was that of Tech 3 rider Carlos Checa in ninth - and was crucial for his 2006 title hopes. As Rossi climbed the podium with an Italian football shirt over his leathers - a reference to the national team's World Cup triumph - he celebrated not only his 56th MotoGP victory, but also reducing Hayden's championship advantage from 35 to 26 heading to the Kentuckian's home race at Laguna Seca next weekend.
But matching Rossi in the post-race smile stakes was Melandri who, broken collarbone of not, took his second podium in a row and is now 35 points from Nicky. Between Rossi and Melandri in the championship standings is Pedrosa, now three points behind Rossi. Pedrosa set the fastest lap of the race, but probably lost out on victory due to a lack of experience - and appeared to be particularly punished for his (understandable) lack of confidence into the downhill left hander.
Best of the rest was Capirossi, who crossed the finish line 8.4secs from Pedrosa's Repsol Honda. The result means that Capirossi - tied with Hayden before his Catalan accident four rounds ago - is now a massive 51 points from the American.
Kawasaki's Shinya Nakano pushed his fellow Bridgestone rider hard in the closing stages, but crossed the line less than half a second down at his team's home race, while Chris Vermeulen was the top Suzuki rider in seventh.
Sete Gibernau claimed a brave eighth, a fraction behind the Australian rookie, on his return from collarbone surgery, while Checa's ninth marked an impressive performance for the Tech 3 team and their Dunlop tyres.