Luis Salom edged out Sandro Cortese and Jonas Folger to claim his second Moto3 victory in a frantic race at Aragon.
Second was enough to move Cortese into a near-unassailable position in the championship, after his closest rival Maverick Vinales' Avintia FTR-Honda suffered a seized engine on the warm-up lap and was unable to compete.
Cortese tried to take full advantage of his absence and several times hit the front and attempted to lift the pace, but he was not able to break free from a lead pack that never consisted of less than seven riders and was rarely separated by more than one second.
The result was a constantly changing order, with positions changing ceaselessly throughout the 20-lap contest.
With two laps to run Salom hit the front for the first time, while Cortese suddenly found himself bumped down to fifth, having led for much of the middle section.
The German fought back and on the final lap cut by Salom to retake the lead, only to get demoted once more, with Jonas Folger (Aspar Kalex KTM) also coming by into second.
Ultimately that proved too much to overcome, and while Cortese picked off Folger on the back straight, where the KTM proved mighty, he was not able to bridge back to Salom before the chequered flag fell.
Folger took third ahead of Cortese's team-mate Danny Kent, who moved from eighth to first in the space of one lap just after the race's halfway mark.
Kent lost touch with the lead trio while duelling with Efren Vazquez in the final laps, but despite being run wide by the Spaniard was able to hang on to claim fourth.
Vazquez sealed fifth, while Louis Rossi - another rider who enjoyed a spell at the front - split Monlau Honda team-mates Alex Rins and Miguel Oliveira, who finished sixth and eighth respectively.
Zulfahmi Khairuddin also led in the early stages, but dropped to the back of the front pack as the race wore on and then crashed out with six laps to run.
Results - 20 laps:
Pos Rider Team/Bike Time/Gap
1. Luis Salom RW Kalex-KTM 40m56.391s
2. Sandro Cortese Ajo KTM + 0.155s
3. Jonas Folger Aspar Kalex-KTM + 0.362s
4. Danny Kent Ajo KTM + 1.115s
5. Efren Vazquez Laglisse FTR-Honda + 1.160s
6. Alex Rins Monlau Suter-Honda + 1.765s
7. Louis Rossi Germany FTR-Honda + 1.839s
8. Miguel Oliveira Monlau Suter-Honda + 1.972s
9. Arthur Sissis Ajo KTM + 2.415s
10. Niccolo Antonelli Gresini FTR-Honda + 2.587s
11. Jakub Kornfeil Ongetta FTR-Honda + 2.845s
12. Alessandro Tonucci Italia FMI FTR-Honda + 3.067s
13. Alberto Moncayo Laglisse FTR-Honda + 3.763s
14. Niklas Ajo TT Motion KTM + 14.899s
15. Alex Marquez Ambrogio Suter-Honda + 15.041s
16. Brad Binder RW Kalex-KTM + 36.470s
17. Isaac Vinales Ongetta FTR-Honda + 37.422s
18. Toni Finsterbusch Germany Honda + 37.457s
19. Jack Miller Caretta Honda + 38.312s
20. Luca Amato Aspar Kalex-KTM + 40.831s
21. Alan Techer Technomag-CIP TSR-Honda + 40.849s
22. John McPhee Caretta KRP Honda + 41.879s
23. Giulian Pedone Ambrogio Suter-Honda + 42.044s
24. Juan Francisco Guevara Wild Wolf BST FTR-Honda + 55.896s
25. Danny Webb Mahindra + 1m02.687s
26. Kenta Fujii Technomag-CIP TSR-Honda + 1m18.055s
27. Armando Pontone Ioda + 1m18.374s
Adrian Martin Laglisse FTR-Honda 17 laps
Miroslav Popov Mahindra 16 laps
Zulfahmi Khairuddin Ajo KTM 14 laps
Romano Fenati Italia FMI FTR-Honda 9 laps
Jorge Navarro Larresport Honda 1 lap
Jasper Iwema FGR-Honda 1 lap
Maverick Vinales Avintia FTR-Honda 0 laps