Marc Marquez snatched pole from Valentino Rossi on his final lap of a thrilling qualifying session for the Malaysian MotoGP at Sepang.

A brief rain shower on part of the circuit just before qualifying created treacherous conditions, ultimately resulting in the top eight riders setting their best time on their very final lap of the Q2 shootout.

Despite the risk of moisture, rookie title leader Marquez claimed his fourth pole in a row and eighth of the year with a new official record of 2m 0.011s. That knocked Rossi - who had to overtake Andrea Dovizioso at the final turn of his best lap - from what would have been a first pole of the year by 0.325s.

Related Articles

Nevertheless, second is still Rossi's best qualifying performance of the season.

Top satellite rider Cal Crutchlow, hampered by a visibly swollen right arm injury from Silverstone, completed the front row for Tech 3 Yamaha with a best lap 0.348s from Marquez.

Rossi's factory Yamaha team-mate Jorge Lorenzo had pulled into the pits after an early 'moment' sent him off-track. The Spaniard then went to the top on his return late in the session and improved further on his final lap.

But the reigning double champion was still pushed down to fourth by the spate of last-gasp improvements. Lorenzo will be joined on row two by Marquez's team-mate and practice pace setter Dani Pedrosa, plus Gresini Honda's Alvaro Bautista.

Row three will comprise Tech 3 rookie Bradley Smith, the top Ducati of Andrea Dovizioso and leading CRT competitor Aleix Espargaro.

Honda LCR's Stefan Bradl has been ruled out of the race after fracturing his right ankle in a final practice fall.

With four races and a maximum of 100 points available, Marquez holds a 39-point title advantage over Lorenzo and 59 point lead over Pedrosa.

Qualifying 2:
1. Marc Marquez
2. Valentino Rossi
3. Cal Crutchlow
4. Jorge Lorenzo
5. Dani Pedrosa
6. Alvaro Bautista
7. Bradley Smith
8. Andrea Dovizioso
9. Aleix Espargaro
10. Andrea Iannone
11. Nicky Hayden
12. Stefan Bradl