Valentino Rossi has burst from outside the top six to take his first pole position for his home race at Mugello since 2008, after an impressive lap in the closing stages of qualifying at the Italian track handed him the top spot from Maverick Viñales by only 0.094.
Rossi was able to utilise a tow from Viñales to take the P1 place, but a fast lap of his own next time round was enough to second Viñales his best qualifying position of the year.
Andrea Iannone was third, utilising a two of his own from Jorge Lorenzo, while Marc Marquez led the second row from the reigning world champion and a strong run from Q1 qualifier Aleix Espargaró.
Dani Pedrosa improved his fortunes in seventh, ahead of Bradley Smith and Danilo Petrucci, while Scott Redding rounded out the top ten.
Andrea Dovizioso was back in 13th on the second factory Ducati as he still struggles with a neck injury, while Cal Crutchlow was a distant 16th after crashing out of the session. Eugene Laverty will start from 18th.