Jorge Lorenzo captured his fifth pole of the season as MotoGP qualifying built to a three-way shootout at Aragon.
The Spaniard edged out championship rival Dani Pedrosa by just eight hundredths of a second, with Cal Crutchlow - on top for much of the running - a further 0.1s back in third.
All three riders had set personal bests in the first sector of their final efforts, but ultimately lost time over the rest of their laps.
The upshot was that Lorenzo hung on to pole, having only moved to the top in the final two minutes.
Pedrosa meanwhile was able to bounce back from an early crash, and the disadvantage of switching to his second Honda, to also soar in the final moments.
Crutchlow, by contrast, had made his move at the halfway mark and spent much of the session more than six tenths clear of the field.
As Lorenzo and Pedrosa made their charge he also improved, but fell just short of what would have been his first MotoGP pole.
Ben Spies made it three Yamahas in the top four, finishing less than four tenths of a second down on his works team-mate.
Honda's Stefan Bradl (LCR) and Jonathan Rea meanwhile put in notable performances to seal fifth and seventh, sandwiching the second Tech 3 of Andrea Dovizioso.
In only his second MotoGP qualifying session, Rea was therefore able to outpace both works Ducatis.
A difficult session for the Desmosedici was compounded as Valentino Rossi and Nicky Hayden both suffered falls. Rossi dropped his bike at Turn 2 with 25 minutes gone, while Hayden lost his two minutes from the end, ending the session clasping his already injured right hand.
A late effort on his second bike was enough to carry Rossi above Hayden and into eighth, while Hector Barbera on the satellite Pramac Ducati also threatened but ultimately had to settle for 10th.
Aspar's Aleix Espargaro finished as the top CRT rider in 11th, having leapt into ninth, ahead of Rossi, with just over one minute to run.