Dani Pedrosa took a dominant win in the MotoGP race at Jerez, while Marc Marquez and Jorge Lorenzo clashed at the final corner.
Pedrosa had taken the lead from Lorenzo off the line, but he lost the place at the second corner.
Lorenzo and Pedrosa then pulled away from the rest of the field until lap six, when the Honda rider made it back into the lead with a move into the Dry Sack hairpin.
From there, Pedrosa pulled away as Lorenzo's attention switched to rookie Marquez, who had dealt with a fast starting Valentino Rossi in the early laps to get up to third.
Marquez seemed to back off after a few failed attempts at taking second place, but he came on strong again in the closing stages to get back onto the reigning champion's tail.
The 20-year-old failed with a lunge into Dry Sack on the final lap, where he ran wide and allowed Lorenzo to hang onto the place.
But Marquez closed back up in the following corners to get a run into the final hairpin - which has been renamed after Lorenzo - to make a last gasp attack.
As Marquez dived up the inside, Lorenzo tried to hang on around the outside and the pair made contact, with Lorenzo getting pushed off the track and having to settle for third place.
In their wake, Rossi took a lonely fourth, while Cal Crutchlow fought off Alvaro Bautista to take fifth place.
Behind Nicky Hayden in seventh, his Ducati team-mate Andrea Dovizioso had a battle with the CRT bike of Aleix Espargaro for eighth place.
Espargaro briefly got ahead of the works Ducati, but he eventually had to settle for ninth.
Results - 27 laps: Pos Driver Team/Car Time/Gap 1. Dani Pedrosa Honda 45m17.632s 2. Marc Marquez Honda + 2.487s 3. Jorge Lorenzo Yamaha + 5.089s 4. Valentino Rossi Yamaha + 8.914s 5. Cal Crutchlow Tech 3 Yamaha + 12.663s 6. Alvaro Bautista Gresini Honda + 15.094s 7. Nicky Hayden Ducati + 25.632s 8. Andrea Dovizioso Ducati + 41.881s 9. Aleix Espargaro Aspar Aprilia + 43.812s 10. Bradley Smith Tech 3 Yamaha + 44.461s 11. Michele Pirro Ducati + 45.974s 12. Hector Barbera Avintia FTR-Kawasaki + 59.859s 13. Michael Laverty Paul Bird PBM-Aprilia + 1m09.743s 14. Danilo Petrucci Ioda-Suter-BMW + 1m17.813s 15. Colin Edwards Forward FTR-Kawasaki + 1m18.177s 16. Bryan Staring Gresini FTR-Honda + 1m18.928s 17. Claudio Corti Forward FTR-Kawasaki + 1m19.307s 18. Hiroshi Aoyama Avintia FTR-Kawasaki + 1m19.457s Retirements: Stefan Bradl LCR Honda 24 laps Andrea Iannone Pramac Ducati 24 laps Lukas Pesek Ioda-Suter-BMW 24 laps Randy de Puniet Aspar Aprilia 25 laps Yonny Hernandez Paul Bird Aprilia 25 laps