Jack Miller's best lap of 2m 12.450 set a new lap and pole record of Sepang for the Red Bull KTM Ajo rider at the same time as title leader Alex Marquez fell from his Estrella Galicia Honda, leaving him in fifth.
British rider John McPhee had been on the pace all weekend, having been the first rider to set a new best lap of the track in FP3 and remained in contention having topped the session, taking second for the SaxoPrint-RTG team.
|On Track...Tito Rabat Photo: Marc VDS|
Efren Vazquez took fourth on the second SaxoPrint machine, Marquez fifth, while Romano Fenati enjoyed his best qualifying for some time with sixth on the grid for Sky Racing Team VR46.
Danny Kent seemed spurred on by a late crash, going on to set his best lap at the flag for a gutsy seventh.
Joining him on row two are Team Calvo's Isaac Vinales in eighth and Mahindra's Miguel Oliveira in ninth, with Enea Bastianini completing the top ten for Junior Team Go& Fun.
Alex Rins continued to struggle and finds himself down in 19th.
Top home rider was wild-card Ramdan Rosli in 21st beating regular rider Zulfahmi Khairuddin by one place, in 22nd after a crash.
Moto2 was last and got the worst of the heat, with even the consistent, metronomic performance of eventual pole man Tito Rabat broken up by a break in his pit box.