Sepang - World championship leader Marc Marquez of Spain took his eighth pole position of the season on Saturday, ahead of Sunday's Malaysian Grand Prix.
The 20-year-old rookie, who is the youngest rider ever to lead a championship, came ahead of seven-time world champion Valentino Rossi and British rider Cal Crutchlow.
Marquez' time of 2 minutes 00.011 seconds breaks the Sepang track record of 2:00.334 set by defending world champion Jorge Lorenzo last year.
"I'm really happy with this pole position... Things worked out for us, and I got a time I really wasn't expecting," he said.
"Tomorrow will be a different story because Lorenzo and Dani (Pedrosa) both have a great pace so we shall see," he said.
Lorenzo will be starting in fourth place in the second row of the grid on his Yamaha, next to Marquez' Honda teammate Pedrosa and Spain's Alvaro Bautista.
MotoGP qualifying took place after a shower as more rain clouds loomed with riders saying the conditions had been difficult, causing some of them to almost crash.
"I tried to make a perfect lap, but the problem was that in turn 6 and turn 7, the track was still a little bit wet," Lorenzo, who secured pole last year, said.
"The other riders had more confidence, they were a little bit braver in this corner and they lost less," he said.
His Yamaha teammate Rossi said he hoped for a dry day for the 20-lap race, which rain cut short last year with Pedrosa crowned the winner.
Pedrosa was also the fastest in free practice on Friday.
It was bad news for Stefan Bradl, who ranks sixth in the championship standings.
The German rider missed qualifying practice and will not participate in Sunday's race after breaking his ankle when crashing in a corner during the fourth free practice session.
In Moto2, Spain's Esteve Rabat secured pole, followed by Thomas Luthi of Switzerland and Spaniard Pol Espargaro. Championship leader Scott Redding will start from 10th place.
In Moto3, championship leader Luis Salmon of Spain took pole, followed by France's eighth-ranked Alexis Masbou and Italy's 17th-ranked Niccolo Antonelli.
The 5.5-km Sepang International Circuit is known for its extreme weather conditions with sweltering humid temperatures that can soar well above 30 degrees Celsius and torrential afternoon downpours.
In 2011, MotoGP rising star Marco Simoncelli died in an accident during the race, while a Malaysian racer and marshal were killed in a crash late last month.
Race officials insist the circuit is safe.