Spain's Dani Pedrosa will start Sunday's Malaysian Grand Prix from pole position after recording the fastest ever lap by a MotoGP bike at Sepang.
Pedrosa set a time of one minute 59.053 seconds on his opening lap in the second qualifying session to secure his first pole position since the Catalan GP in 2014 and his 28th in MotoGP.
Team-mate Marc Marquez made it a 1-2 for Repsol Honda, albeit four tenths of a second behind, with championship leader Valentino Rossi third.
Rossi had been in fourth place as the chequered flag was waved, but pulled out his best time on his last lap to leapfrog Movistar Yamaha team-mate and title rival Jorge Lorenzo by just 0.011secs.
Rossi can secure the title this weekend if he wins the race and Lorenzo finishes no higher than fifth. If Rossi finishes second, the Italian will need Lorenzo to be outside the top 10.
Lorenzo had earlier crashed for only the third time in 2015 during the fourth practice session, but was unhurt and able to use his second bike until his first was repaired.
Britain's Cal Crutchlow (LCR Honda) is fifth on the grid ahead of Ducati Team's Andrea Iannone.