Petronas Yamaha rookie Fabio Quartararo smashed the lap record at the Sepang International Circuit to earn his team a home pole position for Sunday's Malaysian Grand Prix, while MotoGP world champion Marc Marquez suffered a nasty crash.
Quartararo's one minute 58.303 seconds lap helped him finish ahead of Maverick Vinales (1:58.406), with Franco Morbidelli completing the Yamaha front-row lockout.
Marquez, who sewed up his sixth MotoGP title and fourth in a row in Thailand last month, spent much of the session trailing Quartararo before suffering a massive highside entering Turn 2.
The Honda rider crashed and walked away gingerly after the accident and will start 11th, his worst qualifying performance since the 2015 Italian Grand Prix.
Marquez off his back, Quartararo came up with a blinding lap with two minutes to go and smashed his visor in celebration.
Pramac Ducati rider Jack Miller will start fourth with LCR Honda's Cal Crutchlow and Yamaha's Italian great Valentino Rossi joining him in the second row.
Triple MotoGP champion Jorge Lorenzo of Repsol Honda will start 18th after going more than a second short of the Q1 pace.
Marquez extended his championship lead to an unbeatable 375 points with two races remaining, in Malaysia and on home soil in Valencia.