Marc Marquez denied Valentino Rossi a first MotoGP pole in three years as rain produced a thrilling climax to qualifying at Sepang.
Cal Crutchlow claimed third, meaning Jorge Lorenzo – who had been top as the checkered flag flew – had to settle for fourth ahead of Dani Pedrosa and Alvaro Bautista.
A sudden downpour right at the start of Q2 threw preparations into chaos, although its equally sudden finish – and the high temperatures of Malaysia – meant all the riders were able to brave slicks for the pole shootout.
Lorenzo still found the track treacherous, having to abandon his first run after a big moment and save at Turn 7. In those conditions his Yamaha teammate Rossi flew, with his first effort a full three seconds better than the rest of the field.
The track continued to dry, however, meaning timing was crucial as riders found massive gains on their final runs. Lorenzo kicked it off, jumping to top spot before improving to a 2m00.578s as the checkered waved. A host of riders were on quicker laps, however, including Honda's Marquez and Pedrosa - who at the time were languishing down in eighth and sixth respectively.
Crutchlow and then Rossi duly demoted Lorenzo, meaning that Rossi stood on the brink of his 50th grand prix pole. That situated lasted all of five seconds: Marquez came across in a record 2m00.011s to seal pole by three tenths of a second.
Pedrosa's lap unraveled and meant he had to settle for fifth, having set the pace in every session leading up to qualifying.
Bradley Smith, Andrea Dovizioso and Pol Espargaro – who progressed through from Q1 alongside Andrea Iannone – will share the third row.
Stefan Bradl did not compete in the session, and will also miss Sunday's race, after fracturing his right ankle in fourth practice. The German fell at Turn 1 and appeared to catch his ankle in the artificial turf run-off.
Pos Rider Team/Bike Time Gap
1. Marc Marquez Honda 2m00.011s
2. Valentino Rossi Yamaha 2m00.336s +0.325s
3. Cal Crutchlow Tech 3 Yamaha 2m00.359s +0.348s
4. Jorge Lorenzo Yamaha 2m00.578s +0.567s
5. Dani Pedrosa Honda 2m00.692s +0.681s
6. Alvaro Bautista Gresini Honda 2m00.974s +0.963s
7. Bradley Smith Tech 3 Yamaha 2m01.306s +1.295s
8. Andrea Dovizioso Ducati 2m01.635s +1.624s
9. Aleix Espargaro Aspar Aprilia 2m02.151s +2.140s
10. Andrea Iannone Pramac Ducati 2m02.536s +2.525s
11. Nicky Hayden Ducati 2m02.900s +2.889s
12. Stefan Bradl LCR Honda 2m01.083s +1.072s
13. Colin Edwards Forward FTR-Kawasaki 2m02.858s +2.847s
14. Claudio Corti Forward FTR-Kawasaki 2m03.175s +3.164s
15. Hector Barbera Avintia FTR-Kawasaki 2m03.212s +3.201s
16. Hiroshi Aoyama Avintia FTR-Kawasaki 2m03.418s +3.407s
17. Yonny Hernandez Pramac Ducati 2m03.651s +3.640s
18. Randy de Puniet Aspar Aprilia 2m03.805s +3.794s
19. Michael Laverty PBM Aprilia 2m04.198s +4.187s
20. Danilo Petrucci Ioda-Suter-BMW 2m04.310s +4.299s
21. Luca Scassa Cardion Aprilia 2m05.199s +5.188s
22. Bryan Staring Gresini FTR-Honda 2m06.038s +6.027s
23. Lukas Pesek Ioda-Suter-BMW 2m06.203s +6.192s
24. Damian Cudlin PBM-Aprilia 2m06.273s +6.262s