Jonas Folger captured his first pole position in grand prix racing after a thrilling Moto3 qualifying session on a drying Aragon track.
Times tumbled throughout the 35 minutes, with the lead changing hands almost ceaselessly as a result.
The trend lasted right until the final seconds, with Luis Salom (RW Kalex-KTM) jumping to the top of the timesheets as the chequered flag flew.
Folger (Aspar Kalex KTM) responded however, setting his own personal best at the death to pull 0.152s clear of Salom.
Championship leader Sandro Cortese was still out on track, but the 22-year-old German - already with six poles to his credit this year - couldn't improve and had to settle for third, completing an all-KTM front row.
He will therefore start directly in front of his nearest rival Maverick Vinales (Avintia FTR-Honda), who found himself bumped down to sixth in the final minute by Danny Kent (Ajo KTM).
Despite his title aspirations, Vinales is also facing competition for second in the standings, with Salom just 10 points behind heading into Sunday's race.
Romano Fenati, Zulfahmi Khairuddin, Efren Vazquez, Miguel Oliveira and Alex Rins all enjoyed spells at the top during various points of the session.
As others improved they were demoted however. Fenati still start from fourth, while Khairuddin will share the third row with Vazquez and Oliviera.
Pos Rider Team/Bike Time Gap
1. Jonas Folger Aspar Kalex KTM 2m01.715s
2. Luis Salom RW Kalex-KTM 2m01.867s + 0.152s
3. Sandro Cortese Ajo KTM 2m02.041s + 0.326s
4. Romano Fenati Italia FMI FTR-Honda 2m02.202s + 0.487s
5. Danny Kent Ajo KTM 2m02.236s + 0.521s
6. Maverick Vinales Avintia FTR-Honda 2m02.362s + 0.647s
7. Zulfahmi Khairuddin Ajo KTM 2m02.387s + 0.672s
8. Efren Vazquez Laglisse Honda 2m02.461s + 0.746s
9. Miguel Oliveira Monlau Honda 2m02.571s + 0.856s
10. Alex Rins Monlau Honda 2m02.763s + 1.048s
11. Niccolo Antonelli Gresini Honda 2m02.976s + 1.261s
12. Alberto Moncayo Aspar Kalex-KTM 2m03.012s + 1.297s
13. Louis Rossi Germany FTR-Honda 2m03.081s + 1.366s
14. Alessandro Tonucci Italia FMI FTR-Honda 2m03.290s + 1.575s
15. Juan Guevara Wild Wolf FTR-Honda 2m03.412s + 1.697s
16. Arthur Sissis Ajo KTM 2m03.414s + 1.699s
17. Jakub Kornfeil Ongetta FTR-Honda 2m03.588s + 1.873s
18. Alex Marquez Estrella Suter Honda 2m03.635s + 1.920s
19. Adrian Martin Laglisse Honda 2m03.753s + 2.038s
20. Niklas Ajo TT Motion KTM 2m03.888s + 2.173s
21. Giulian Pedone Ambrogio Oral 2m03.981s + 2.266s
22. Luca Amato Aspar Kalex-KTM 2m04.030s + 2.315s
23. Jack Miller Caretta Honda 2m04.405s + 2.690s
24. Jasper Iwema FGR-Honda 2m04.820s + 3.105s
25. Toni Finsterbusch MZ-Honda 2m05.211s + 3.496s
26. Jorge Navarro Larresport Honda 2m05.323s + 3.608s
27. John McPhee Caretta Honda 2m05.441s + 3.726s
28. Danny Webb Mahindra 2m05.547s + 3.832s
29. Issac Vinales Ongetta FTR-Honda 2m05.830s + 4.115s
30. Alan Techer Technomag-CIP TSR-Honda 2m05.926s + 4.211s
31. Armando Pontone Ioda 2m06.259s + 4.544s
32. Brad Binder RW Kalex-KTM 2m06.882s + 5.167s
33. Kenta Fujii Technomag-CIP TSR-Honda 2m07.380s + 5.665s
34. Miroslav Popov Mahindra 2m08.406s + 6.691s