Jorge Lorenzo snatched pole by 0.014 seconds from Ducati teammate Andrea Dovizioso in MotoGP Aragon Grand Prix qualifying, while Valentino Rossi was a lowly 18th.
A crash in FP4 left Marc Marquez with just one Honda at his disposal for qualifying, though this did nothing to dent his confidence, as he fired in the best lap of the weekend to set the benchmark on his opening flying lap with a 1:46.974s.
Lorenzo put this under pressure on his opening gambit, but a mistake exiting the final turn lost him a tenth and left him second, while LCR's Cal Crutchlow jumped up to third.
Marquez's follow-up flying lap saw him improve to a 1:46.960s, while Dovizioso sat fourth on the second works Ducati.
The Honda rider shadowed Dovizioso as they left pitlane for their final run, with the latter aborting his penultimate lap before it had started in a bid to drop the Honda man.
However, Marquez remained glued to the rear of the GP18, and following Dovizioso in lighting up the timing screens through the first two sectors of the lap on their final attempt.
A mistake at Turn 12 ended Marquez's hopes of a first pole since Austria, though Dovizioso shot to the top of the timesheets with a 1:46.895s.
But teammate Lorenzo made sure the Italian remained at the top of standings only briefly, as he fired in a 1:46.881s to take his third-successive pole.
Dovizioso missed out by 0.014s in the end, with Marquez completing the top three ahead of Crutchlow, who held onto fourth despite a late fall at Turn 12.
Andrea Iannone put his Suzuki fifth on the grid ahead of the second Repsol Honda of Dani Pedrosa, while Danilo Petrucci headed row three from Alvaro Bautista and Alex Rins.
Q1 graduates Maverick Vinales and Takaaki Nakagami trailed Jack Miller, who ran second in the opening stages of Q2, to complete the top 12.
The shock of the session came from Yamaha's Rossi, who registered his worst qualifying result since the 2006 Dutch TT after managing just 18th.
The Italian failed to lift himself into Q2 in FP3 along with teammate Vinales, and made a mistake on his final flying lap, meaning he was unable to advance on his 1:48.627s.
Rossi's Academy protege Franco Morbidelli was denied a place in Q2 by Nakagami's late improvement, though 13th marks the first time the Marc VDS rider has out-qualified Rossi this season.
Tech3's Johann Zarco looked set to progress from Q1, but two front-end moments on his final flying lap robbed him of too much time and left him 14th ahead of Aprilia's Aleix Espargaro.
16th-placed Bradley Smith was the sole KTM representative in qualifying after teammate Pol Espargaro re-broke his left collarbone in an FP3 crash.