Dani Pedrosa denied champion Jorge Lorenzo and Honda team-mate Casey Stoner MotoGP pole with a scintillating record lap in qualifying for the MotoGP season-ending Valencia Grand Prix.
It was the departing Stoner who kicked off a frantic 10-minute pole shoot-out in which Cal Crutchlow's Tech 3 Yamaha was also a factor.
For a while it seemed the Australian's 1m31.568s would hold. It featured a mighty final sector sufficient to deny Pedrosa, Crutchlow and Lorenzo several times even when all three had been up over the first three splits.
Lorenzo eventually bested Stoner with seven minutes to run, only for Stoner to once again seize control with a new benchmark two minutes from the end.
The drama was not finished however, as Pedrosa bolted to pole with a new Valencia record of 1m30.844s, eclipsing Valentino Rossi's 2006 mark.
Lorenzo was still out on track, and while he ultimately could not touch Pedrosa, he was able to do enough to demote Stoner into third.
Having also been in the mix until Pedrosa's late rally, Crutchlow had to settle for fourth and a share of the second row alongside LCR Honda's Stefan Bradl and his Tech 3 stablemate Andrea Dovizioso.
Ducati's Nicky Hayden was seventh, four spots ahead of team-mate Rossi in the Italian's final qualifying session for the team.
Alvaro Bautista, Hector Barbera and CRT rider Aleix Espargaro managed to split the pair.
As well as marking Stoner's final qualifying session, it was also the last before the qualifying format undergoes major changes for next year.
Pos Rider Team/Bike Time Gap 1. Dani Pedrosa Honda 1m30.844s 2. Jorge Lorenzo Yamaha 1m31.195s + 0.351s 3. Casey Stoner Honda 1m31.428s + 0.584s 4. Cal Crutchlow Tech 3 Yamaha 1m31.512s + 0.668s 5. Stefan Bradl LCR Honda 1m31.757s + 0.913s 6. Andrea Dovizioso Tech 3 Yamaha 1m31.795s + 0.951s 7. Nicky Hayden Ducati 1m32.503s + 1.659s 8. Alvaro Bautista Gresini Honda 1m32.585s + 1.741s 9. Hector Barbera Pramac Ducati 1m32.605s + 1.761s 10. Aleix Espargaro Aspar Aprilia 1m32.834s + 1.990s 11. Valentino Rossi Ducati 1m32.877s + 2.033s 12. Randy de Puniet Aspar Aprilia 1m33.346s + 2.502s 13. Karel Abraham Cardion Ducati 1m33.442s + 2.598s 14. Colin Edwards Forward Suter-BMW 1m33.453s + 2.609s 15. Michele Pirro Gresini FTR-Honda 1m33.971s + 3.127s 16. Katsuyuki Nakasuga Yamaha 1m33.979s + 3.135s 17. Danilo Petrucci Ioda Suter-BMW 1m33.980s + 3.136s 18. Ivan Silva Avintia FTR-Kawasaki 1m34.407s + 3.563s 19. Roberto Rolfo Speed Master Aprilia 1m34.866s + 4.022s 20. James Ellison Paul Bird Aprilia 1m34.918s + 4.074s 21. Hiroshi Aoyama Avintia FTR-Kawasaki 1m35.363s + 4.519s 22. Claudio Corti Avintia Inmotec-Kawasaki 1m36.531s + 5.687s