(Adds Moto2 and Moto3 poles)
World champion Casey Stoner produced a sizzling lap late in a rain-interrupted qualifying session on Friday to snatch pole position for this weekend's Dutch Grand Prix in Assen.
The Australian Honda rider, who announced last month he would retire at the end of the season, recovered from a heavy crash in practice earlier to clock the fastest time of one minute 33.713 seconds, 0.115 quicker than team mate Dani Pedrosa.
Championship leader Jorge Lorenzo was third a further 0.173 behind.
Honda rookie Stefan Bradl will start fourth on the grid after a career-best qualifying performance while American Yamaha rider Ben Spies, who had been the quickest in the second free practice on Thursday, could only manage sixth.
The session had been interrupted a number of times by rain showers.
Lorenzo leads the MotoGP standings with 140 points with Stoner second (115) and Pedrosa third (101).
The Moto2 pole was claimed by championship leader Marc Marquez ahead of Pol Espargaro, while in the Moto3 category German rider Sandro Cortese was faster than KTM team-mate Danny Kent.