Yamaha's Maverick Vinales took pole position for the San Marino Grand Prix on Saturday after a qualifying flare-up between Honda's championship leader Marc Marquez and Italian great Valentino Rossi.
Vinales lapped Misano's Marco Simoncelli circuit with a best lap of one minute 32.265 seconds, ahead of fellow-Spaniard Pol Espargaro for KTM and Frenchman Fabio Quartararo on the non-works Petronas Yamaha.
Marquez, the five times MotoGP champion who has a 78 point lead over Ducati's Italian Andrea Dovizioso in the standings after 12 of 19 rounds, will start fifth with Yamaha's Rossi seventh.
Dovizioso qualified between the two in sixth, with Petronas Yamaha rider Franco Morbidelli fourth.
Marquez and Rossi traded overtakes on their final laps, almost colliding, with both ending up compromising their efforts. Both were subsequently summoned to the stewards.
The pole was Vinales' first since the season-opener in Qatar, while Espargaro's front row appearance was a surprise for a rider only 11th in the championship.
The Spaniard gained a tow from Quartararo at the end before missing out to Vinales in the dying seconds.
Aprilia's Italian Andrea Iannone missed qualifying after injuring his shoulder in a final practice crash.