Hector Faubel pinched home pole for Sunday's 125cc Aragon Grand Prix by just 0.009sec from countryman Maverick Vinales on his very final lap of Saturday's qualifying session.
It was Faubel's first grand prix pole since 2007, while race-winning rookie Vinales claimed a front row start for the first time since Germany.
Faubel's Aspar Aprilia team-mate and title leader Nico Terol had led the session until four-minutes to go, when Vinales moved ahead.
Terol finished just 0.143sec from pole to claim the final place on Sunday's front row.
Title rival Johann Zarco will head row two after qualifying his Ajo Derbi 0.376sec from Faubel.
Zarco starts this weekend 31 points behind Terol, having once again been denied a debut race victory last time out at Misano, when he appeared to concede defeat before the line.
1. Faubel (Aprilia) 1m 59.222s
2. Vinales (Aprilia) +0.009s
3. Terol (Aprilia) +0.143s
4. Zarco (Derbi) +0.376s
5. Kent (Aprilia) +0.592s
6. Salom (Aprilia) +0.680s
7. Cortese (Aprilia) +0.789s
8. Moncayo (Aprilia) +1.094s
9. Vazquez (Derbi) +1.210s
10. Folger (Aprilia) +1.225s
21. Stafford (Aprilia) +2.897s
23. Webb (Mahindra) +3.178s
28. Mackenzie (Aprilia) +4.062s