Hector Faubel upstaged the 125cc title contenders to take his first pole position of the season at Aragon.
The 2007 125cc runner-up was brought back to the series by Aspar this year after three underwhelming seasons in 250cc/Moto2, and today's pole marks the first time he has topped qualifying since the '07 Sepang 125cc race.
Faubel did not look like a pole contender going into the closing stages as his points-leading team-mate Nico Terol and Blusens rider Maverick Vinales fought it out.
But in the closing moments Faubel came through with a 1m59.222s to deny Vinales a fourth pole of his rookie season by just 0.009 seconds.
Terol completes an all-Spanish front row, ahead of his title rival Johann Zarco (Ajo Derbi).
Danny Kent (Ajo Aprilia) and Luis Salom (RW Aprilia) join Zarco on row two.
Vinales' new team-mate Josep Rodriguez, replacing the Moto2-bound Sergio Gadea, was in the top 10 for a long while before slipping to 12th in the end. The Spanish championship frontrunner is making his fifth 125cc start after a handful of wildcard appearances.