Marc Marquez came out on top after a thrilling last-lap battle with Fabio Quartararo to win the San Marino Grand Prix on Sunday.
Petronas Yamaha rookie Quartararo led for the majority of the race and looked set to become the second-youngest rider to top a MotoGP podium, but reigning champion Marquez denied him at the death.
The lead changed hands three times on an enthralling final lap, before the Frenchman had to sit up at turn 14 and thus granted Marquez enough of an advantage to hold on for the win.
Pole-sitter Maverick Vinales had to settle for third, taking the final step on the podium ahead of Monster Energy Yamaha team-mate and home favourite Valentino Rossi.
The victory was Marquez's 77th across all classes and moved him past Mike Hailwood into sole ownership of fourth in the all-time list, while extending his lead in the riders' championship to 93 points.
Marquez may have produced his worst qualifying result of the season at Misano but he was up from fifth to third by the end of the opening lap.
Quartararo, who had been tipped to challenge for victory at the British Grand Prix last time out but crashed on the first corner, made his move on Vinales on the back straight and Marquez followed him on the next lap with a clever dive down the inside at turn nine.
The duo dropped Vinales and were left to battle it out for the win on their own. The Repsol Honda rider failed with an attempt to pass before finally securing the overtake into turn one on the final circuit.
Quartararo regained track position quickly but gave it up just as fast, and when he misjudged his line at the start of the final sector the game was up.
Alex Rins triumphed at Silverstone but slid out after being handed a long-lap penalty and then retired from the race, while Andrea Dovizioso – Marquez's nearest rival in the championship standings – finished behind Franco Morbidelli in sixth.
Pol Espargaro started second - Red Bull KTM Factory Racing's best qualifying performance - but finished seventh, while Jorge Lorenzo was down in 14th and over 47 seconds behind Marquez.
1. Marc Marquez (Repsol Honda)
2. Fabio Quartararo (Petronas Yamaha)
3. Maverick Vinales (Monster Energy Yamaha)
4. Valentino Rossi (Monster Energy Yamaha)
5. Franco Morbidelli (Petronas Yamaha)
6. Andrea Dovizioso (Ducati)
7. Pol Espargaro (Red Bull KTM Factory Racing)
8. Joan Mir (Suzuki Ecstar)
9. Jack Miller (Pramac Racing)
10. Danilo Petrucci (Ducati)
1. Marc Marquez (Repsol Honda) 275
2. Andrea Dovizioso (Ducati) 182 (-93)
3. Danilo Petrucci (Ducati) 151 (-124)
4. Alex Rins (Suzuki Ecstar) 149 (-126)
5. Maverick Vinales (Monster Energy Yamaha) 134 (-141)
1. Ducati 333
2. Repsol Honda 308 (-25)
3. Monster Energy Yamaha 263 (-70)
4. Suzuki Ecstar 200 (-133)
5. Petronas Yamaha 192 (-141)
There is only one week to wait until the Aragon Grand Prix, where Marquez has won in each of the past three years.