Luco di Mugello - Jorge Lorenzo overtook Marc Marquez at the line to win the Italian MotoGP on Sunday, as home favourite Valentino Rossi retired with a mechanical problem.
Spaniard Lorenzo took the lead from pole-sitter Rossi at the first corner, but nine-time world champion Rossi bowed out early after his bike failed him when he was looking primed to make a pass.
Instead it was down to Marquez to pressure world champion Lorenzo, and he took the lead from his compatriot on the final lap, only to see the Yamaha man steal the victory metres from the finish.
After a week in which riders have been swapping teams for next season, outgoing Ducati rider Andrea Iannone had a horrific start for the home team.
He and team-mate Andrea Dovizioso had only finished two races each going into this week, and neither ever looked like challenging for the lead at the Mugello Circuit.
That meant that the home crowd had their hopes pinned on 37-year-old Rossi, but those went up in smoke with 13 of 23 laps still to go.
Championship leader Lorenzo made the most of the opportunity to claim his third win of the season and second in a row, to extend his advantage in the riders' standings over Honda's Marquez to 10 points.
"The pace was not very fast, so I couldn't escape like I wanted to," Lorenzo said.
"I used up a lot of energy to stay in the lead during the race and I thought that Marquez had more energy when he passed me, so I just wanted to stay in second place and take the points.
"I tried a crazy move, and my bike was quite fast, so I could take the win off Marquez and I won this unexpected victory."
Iannone, who confirmed that he will be joining Suzuki next year after Ducati chose Dovizioso to partner the incoming Lorenzo for next season, battled back well to take a podium finish from what had been a very encouraging week.
"I am a bit disappointed. The clutch slipped and the bike started with a big wheelie," Iannone said.
"The podium in Italy is very good but I had the potential to fight for the victory."
Earlier at Mugello, French reigning champion Johann Zarco won the Moto2 category.
He finished ahead of Italian Lorenzo Baldassarri and Briton Sam Lowes, the latter taking over at the top of the overall standings from Spanish rival Alex Rins.
South African Brad Binder consolidated his Moto3 lead by reeling off a third successive win.
1. Jorge Lorenzo (ESP/Yamaha) 41min 36.535sec, 2. Marc Marquez (ESP/Honda) at 0.019sec, 3. Andrea Iannone (ITA/Ducati) 4.742, 4. Dani Pedrosa (ESP/Honda) 4.910, 5. Andrea Dovizioso (ITA/Ducati) 6.256, 6. Maverick Vinales (ESP/Suzuki) 8.670, 7. Bradley Smith (GBR/Yamaha Tech3) 13.340, 8. Danilo Petrucci (ITA/Ducati Pramac) 14.598, 9. Aleix Espargaro (ESP/Suzuki) 18.643, 10. Michele Pirro (ITA/Ducati) 22.29