Alcañiz - Spain's Jorge Lorenzo secured his fourth pole position of the 2018 MotoGP season on Saturday by sneaking ahead of Andrea Dovizioso in qualifying at Aragon.
Lorenzo beat his Italian Ducati team-mate by 0.014, while Honda's Marc Marquez was 0.079 back in third.
Marquez, who is chasing a fifth top-class world championship title but is without a victory in his last four races, had set the pace with a time of 1.46.960.
But the Spaniard paid the price for a mistake at Turn 12 on his final run as Lorenzo and Dovizioso both saved their best times until last.
"My rear tire was a bit worn out so I didn't know if I would have anything left to improve in my last attempt," Lorenzo said.
"But I managed to do a few thousandths better than Andrea, who also did a great lap."
Yamaha's Valentino Rossi managed to complete only one timed lap during the session. The Italian veteran qualified in a disappointing 18th, his lowest grid position since 2006.
Britain's Cal Crutchlow was pushed back into the second row after finishing fourth. He missed the chance to fight for a top-three spot after crashing out during his last lap.
Crutchlow sits in front of Spain's Dani Pedrosa, Italian Danilo Petrucci and another Spaniard, Alvaro Bautista, who came in sixth, seventh and eighth respectively.
Marquez owns a 67-point lead over Dovizioso in the standings ahead of Sunday's race, with Rossi sitting third, 70 points adrift.
The race in Aragon is the 14th round of the championship and third of four events to be held in Spain this season.
Grids for the Aragon motorcycling Grand Prix after qualifying on Saturday:
MotoGP
Front row
1. Jorge Lorenzo (ESP/Ducati) 1min 46.881sec, 2. Andrea Dovizioso (ITA/Ducati) at 0.014sec, 3. Marc Marquez (ESP/Honda) 0.079
Second row
4. Cal Crutchlow (GBR/LCR Honda) 0.265, 5. Andrea Iannone (ITA/Suzuki) 0.288, 6. Dani Pedrosa (ESP/Honda) 0.343
Third row
7. Danilo Petrucci (ITA/Ducati Pramac) 0.470, 8. Alvaro Bautista (ESP/Ducati) 0.797, 9. Alex Rins (ESP/Suzuki) 0.856
Fourth row
10. Jack Miller (AUS/Ducati Pramac) 0.911, 11. Maverick Vinales (ESP/Yamaha) 0.929, 12. Takaaki Nakagami (JPN/Honda) 1.403
Selected:
Sixth row
18. Valentino Rossi (ITA/Yamaha)
Moto2
Front row
1. Brad Binder (RSA/KTM) 1:53.149, 2. Marcel Schrotter (GER/Kalex) at 0.074, 3. Jorge Navarro (ESP/Kalex) 0.108
Second row
4. Alex Marquez (ESP/Kalex) 0.108, 5. Francesco Bagnaia (ITA/Kalex) 0.126, 6. Mattia Pasini (ITA/Kalex) 0.168
Third row
7. Fabio Quartararo (FRA/Speed Up) 0.317, 8. Lorenzo Baldassari (ITA/Kalex) 0.331, 9. Simone Corsi (ITA/Kalex) 0.456
Fourth row
10. Luca Marini (ITA/Kalex) 0.480, 11. Augusto Fernandez (ESP/Kalex) 0.522, 12. Xavi Vierge (ESP/Kalex) 0.527
Moto3
Front row
1. Jorge Martin (ESP/Honda) 1:57.066, 2. Jaume Masia (ESP/KTM) 0.537, 3. Enea Bastianini (ITA/Honda) 0.593
Second row
4. Tony Arbolino (ITA/Honda) 0.708, 5. Denis Foggia (ITA/KTM) 0.725, 6. Marco Bezzecchi (ITA/KTM) 0.789
Third row
7. Niccolo Antonelli (ITA/Honda) 0.813, 8. Gabriel Rodrigo (ARG/KTM) 0.871, 9. Aron Canet (ESP/Honda) 0.887
Fourth row
10. Fabio Di Giannantonio (ITA/Honda) 1.083, 11. Adam Norrodin (MAL/Honda) 1.322, 12. Marcos Ramirez (ESP/KTM) 1.323