Pol Espargaro defeated compatriot Nico Terol to secure a home victory in the Spanish 125cc Grand Prix.
The duo had been part of an enormous lead battle that saw them joined by Efren Vazquez, Sandro Cortese and Esteve Rabat in an initial five-bike breakway pack.
Espargaro, Rabat, Vazquez and Terol all took turns in the lead with some frantic place-swapping, while Cortese lurked right behind them, seemingly biding his time.
But the German never had chance to strike, his Ajo Derbi developing a suspension problem that cost him around seven seconds per lap in the closing stages, dropping him back to 11th.
Vazquez then dropped out of contention when he crashed from third with five laps to go, and with Rabat unable to keep up with the lead pace in the latter stages, it came down to a head to head between Espargaro and Qatar winner Terol.
The latter let Espargaro get ahead with little difficulty, apparently confident he still had to strike back, but Espargaro then raised his pace, and a blistering final two laps broke Terol's challenge and secured victory for the ecstatic Espargaro by a relatively comfortable 1.8s.
Rabat completed an all-Spanish podium by holding off a late challenge from Bradley Smith, who had had a hitherto lonely race, to retain third. Tomoyoshi Koyama fended off a horde of rivals to win the most fraught battle of the event and take fifth.
Polesitter Marz Marquez barely featured in the race. He dropped to fourth by the first corner and had a heavy accident before the first lap was complete.
Pos Rider Bike Time/Gap 1. Pol Espargaro Derbi 41m36.146s 2. Nico Terol Aprilia + 1.886s 3. Esteve Rabat Aprilia + 15.180s 4. Bradley Smith Aprilia + 17.110s 5. Tomoyoshi Koyama Aprilia + 25.069s 6. Alberto Moncayo Aprilia + 26.860s 7. Johann Zarco Aprilia + 27.102s 8. Randy Krummenacher Aprilia + 28.465s 9. Alexis Masbou Aprilia + 28.963s 10. Jasper Iwema Aprilia + 58.830s 11. Sandro Cortese Derbi + 1m03.035s 12. Marcel Schrotter Honda + 1m04.722s 13. Adrian Martin Aprilia + 1m04.841s 14. Jakub Kornfeil Aprilia + 1m05.248s 15. Luis Salom Lambretta + 1m09.300s 16. Isaac Vinales Aprilia + 1m09.540s 17. Luca Marconi Aprilia + 1m34.926s 18. Joan Perello Honda + 1m42.695s 19. Johnny Rosell Honda + 1m51.484s 20. Muhammad Zulfahmi Aprilia + 1m51.525s 21. Quentin Jacquet Aprilia + 1 lap 22. Marco Ravaioli Lambretta + 1 lap Retirements: Jonas Folger Aprilia 22 laps Daniel Webb Aprilia 21 laps Efren Vazquez Derbi 18 laps Michael van der Mark Aprilia 15 laps Louis Rossi Aprilia 14 laps Riccardo Moretti Aprilia 5 laps Sturla Fagerhaug Aprilia 1 lap Lorenzo Savadori Aprilia 0 laps Marc Marquez Derbi 0 laps