Jorge Lorenzo defeated Marc Marquez in a stunning British Grand Prix that was only settled at the final corner.
Dani Pedrosa finished third, with Valentino Rossi edging Alvaro Bautista in another last-lap fight to secure fourth.
Home favourite Cal Crutchlow could only take seventh.
Marquez had not even been certain to start the race after dislocating his shoulder in the Sunday morning warm-up, but in the event was able to shadow Lorenzo throughout and surge into the lead several times over the final laps, the pair staging an absolute classic at the front.
Lorenzo was never able to pull a gap of more than 0.3 seconds, but led uncontested for the first 17 laps after picking off Marquez's Honda at the start.
The 20-year-old, chasing a fifth consecutive win, began to look more aggressive as the race progressed however and with two laps to go he finally stole ahead at Brooklands - diving down the inside of the Yamaha and forcing Lorenzo to sit up mid-corner.
Pedrosa was ostensibly involved in the lead scrap and immediately closed onto Lorenzo's tail, but - as was the case at Brno - was unable to properly join the fight.
Lorenzo fought back immediately, repassing Marquez at Vale to hold the lead onto the last lap.
Still it was not done: while Marquez looked to have lost ground, a fantastic exit onto the Wellington Straight allowed him to close onto Lorenzo and stage a dramatic finish.
Marquez initially picked the outside line, but scythed down the inside at the last minute to snatch the lead just two corners from the flag.
Lorenzo stuck it out round the outside, and while Marquez still led going into Luffield his entry was compromised and Lorenzo snuck back ahead before winning the drag down to the line, with just 0.081s to choose between the pair at the flag.
Pedrosa ultimately paid for his poor start, which meant he had to close a two-second gap to the leaders early on in the race and left him with little ammunition to join the late attacks.
Marquez therefore extended his championship lead to 30 points over Pedrosa - the unlikeliest of scenarios when examinations revealed his dislocated shoulder just three hours before the race's start.
Rossi's fourth was secured by an even closer margin, the Italian just six hundredths of a second ahead of Bautista at the line.
Stefan Bradl had held third early on, but on the softer rear tyre faded late on and came home a relatively quiet sixth.
Crutchlow took a lonely seventh, having never been a factor at the front.
Nicky Hayden meanwhile claimed eighth, but only after Andrea Dovizioso crashed out while battling with Bradley Smith for the position. The Briton was ninth.
Results - 20 laps: Pos Rider Team/Bike Time/Gap 1. Jorge Lorenzo Yamaha 40m52.515s 2. Marc Marquez Honda +0.081s 3. Dani Pedrosa Honda +1.551s 4. Valentino Rossi Yamaha +13.233s 5. Alvaro Bautista Gresini Honda +13.298s 6. Stefan Bradl LCR Honda +20.227s 7. Cal Crutchlow Tech 3 Yamaha +26.299s 8. Nicky Hayden Ducati +35.993s 9. Bradley Smith Tech 3 Yamaha +36.119s 10. Aleix Espargaro Aspar Aprilia +53.196s 11. Andrea Iannone Pramac Ducati +59.058s 12. Michele Pirro Pramac Ducati +1m00.710s 13. Hector Barbera Avintia FTR-Kawasaki +1m01.690s 14. Colin Edwards Forward FTR-Kawasaki +1m01.843s 15. Danilo Petrucci Ioda-Suter-BMW +1m08.833s 16. Randy de Puniet Aspar Aprilia +1m09.063s 17. Claudio Corti Forward FTR-Kawasaki +1m16.474s 18. Hiroshi Aoyama Avintia FTR-Kawasaki +1m16.535s 19. Michael Laverty PBM-Aprilia +1m32.057s 20. Yonny Hernandez PBM Aprilia +1m36.224s 21. Bryan Staring Gresini FTR-Honda +2m00.635s Retirements: Andrea Dovizioso Ducati 18 laps Lukas Pesek Ioda-Suter-BMW 1 lap