Valentino Rossi has taken a surprise pole position at Jerez, setting a lap in the dying seconds of the Q2 session at the Spanish track to demote teammate Jorge Lorenzo to second place.
The lap demoted Lorenzo, already impressive with his pace, to second, while a mistake from Marc Marquez on what was looking like being a pole lap demoted him to third at the flag.
Andrea Dovizioso was a distant sixth, over half a second clear of Marquez, leading a second row of Suzukis, with Maverick Viñales and Aleix Espargaro only 0.008 behind him.
Dani Pedrosa was seventh, struggling still with the 2016 Repsol Honda and the Michelin tyres, ahead of Pol Espargaro and Hector Barbera. Cal Crutchlow was the best of the Brits rounding out the top ten.
Bradley Smith was 14th, still chasing a setting that he can make work on the Monster Tech 3 Yamaha, with Eugene Laverty 15th and a despondent Scott Redding was back in 17th as he struggles with rear grip on the Pramac Ducati.