Yamaha's Jorge Lorenzo will start his MotoGP title defence from the front of the grid, after securing his fourth Qatar Grand Prix pole position.
Lorenzo set his best lap, a 1m54.543s, early in the 15-minute shootout, with his second timed lap a full 1.481 seconds faster than any of his rivals had managed.
They chipped away at his margin, and Marc Marquez started the final run just 0.091s behind Lorenzo.
But that was how it stayed, with Marquez unable to improve and Lorenzo staying on top despite a moment on his second run to secure his 41st career MotoGP pole.
There was also late drama for Marquez, whose Honda spat to the left and off the road after the chequered flag, while completing a practice start.
Andrea Iannone, Valentino Rossi and Maverick Vinales started their final laps third, seventh and eighth, and with session-best times through the first two sectors.
They couldn't unseat Lorenzo at the death, but Vinales secured a front row for Suzuki, jumping up to third, just 0.095s behind Lorenzo.
Iannone improved but dropped to fourth, ahead of Rossi, with the top five riders covered by 0.272s.
Andrea Dovizioso was sixth on the second factory Ducati, ahead of Dani Pedrosa, and satellite riders Hector Barbera, Pol Espargaro and Cal Crutchlow.
After his practice sessions were marred by engine-braking issues, Crutchlow went seven-tenths faster than he had all weekend in the first phase of qualifying, to book a place in the final 12.
He advanced with a lap of 1m55.291s, while Bradley Smith also progressed, finishing the main session 11th, ahead of Scott Redding.
Yonny Hernandez and Eugene Laverty will start 13th and 14th, followed by Aleix Espargaro, who fell at Turn 1 but rejoined the action on his second Suzuki.
Alvaro Bautista also crashed and finished the session 17th, with Aprilia team-mate Stefan Bradl 20th and last in the RS-GP's first qualifying session.
Follow the Qatar race as it happens from 5.40pm UK time on Sunday with Autosport Race Centre Live
|8||Hector Barbera||Avintia Ducati||Ducati||1m55.165s||0.622s|
|9||Pol Espargaro||Tech3 Yamaha||Yamaha||1m55.302s||0.759s|
|10||Cal Crutchlow||LCR Honda||Honda||1m55.352s||0.809s|
|11||Bradley Smith||Tech3 Yamaha||Yamaha||1m55.414s||0.871s|
|12||Scott Redding||Pramac Ducati||Ducati||1m55.508s||0.965s|
|13||Yonny Hernandez||Aspar Ducati||Ducati||1m56.157s||-|
|14||Eugene Laverty||Aspar Ducati||Ducati||1m56.186s||-|
|16||Loris Baz||Avintia Ducati||Ducati||1m56.375s||-|
|18||Jack Miller||Marc VDS Honda||Honda||1m56.620s||-|
|19||Tito Rabat||Marc VDS Honda||Honda||1m57.108s||-|