Despite his crash Bagnaia will start in ninth, one place ahead of Espargaro and four ahead of Quartararo who could only manage 12th.
Martin has beaten his previous lap time with a 1:57.790s. Incredible stuff from the Spaniard as he claims pole at Sepang.
WE HAVE THE FIRST-EVER 1M 57S LAP!
Quartararo is last in this session as Aleix Espargaro has crashed out.
Big, big moment for Quartararo as he nearly loses the front at turn eight again.
Marquez goes third - he's produced yet another stunning lap!
Bagnaia is down! The Ducati rider has crashed at turn four after setting the best first sector of the session.
Bagnaia is out for his second and final run - the front row as it stands is Martin, Bastianini and Marini.
Quartararo is only 11th after two flying laps. The Yamaha rider is struggling!
Bagnaia is only sixth but he's on a used rear tyre at the moment.
Martin is three tenths under the lap record and currently six tenths clear of his rivals. Unbelievable!
What an incredible lap from Martin as he comes close to setting the first-ever 1m 37s lap around Sepang.
Luca Marini has matched the first lap time that Bagnaia set in Q1 in order to currently lead the way.
Here we go with the battle for pole in Sepang. Bagnaia is the first rider out of pit lane.
Quartararo is in considerable discomfort as he middle finger has been strapped up. The Yamaha rider is also set to visit the medical centre after the completion of Q2.
So it's Bagnaia and Marquez who advance to Q2!
Miller is out! Marc Marquez has put together a sensational final lap to squeeze into second spot. What an effort from the Repsol rider.
The Australian was slow getting to his feet but appears to be ok to continue.
Jack Miller has crashed at the final corner.
It's not happening for Honda as Marquez can't live with Miller's pace and Alex Marquez crashes at turn eight.
The final time attacks are about to begin with Miller now leading a long queue of riders.
Brad Binder is currently third but he's nearly seven tenths off Bagnaia. The Italian's best lap could be good enough already...
Bagnaia goes even faster on his second lap. He leads the way by four tenths from Miller.