Marc Marquez overcame compatriot Pol Espargaro to take 125cc pole at Jerez as Spaniards filled the first five places on the grid for their home race.
Espargaro had held a half-second cushion over the rest of the field going into the closing stages, but Marques was able to dig deep and depose him with a 1m46.829s lap on the Red Bull Ajo Derbi.
Although Espargaro improved further, he could not get back on terms with Marquez, finishing up 0.104sec adrift.
Efren Vazquez and Esteve Rabat complete the front row, with Nico Terol in fifth.
First non-Spaniard was Germany's Sandro Cortese, who took sixth ahead of British duo Bradley Smith and Danny Webb.