MotoGP championship leader Dani Pedrosa put Honda on pole position at the Italian Grand Prix and knocked fellow-Spaniard Jorge Lorenzo off the top slot in the final seconds of qualifying on Saturday.
Italian Andrea Dovizioso completed the front row for Ducati at the Mugello circuit despite needing painkillers after hurting his neck in a crash on Friday.
Pedrosa's pole, with a time of one minute 47.157 seconds, was his first of the season and came right at the end of the session when he was only seventh on the timesheets as he started his final lap.
His time was 0.069 quicker than double world champion Lorenzo's best.
Italian great Valentino Rossi, Lorenzo's team mate, qualified seventh, one place behind Honda's Marc Marquez.
Spanish rookie Marquez, who has finished on the podium in every race so far this season, crashed in all three practice sessions and cracked the top of his humerus near his right shoulder.
Britain's Cal Crutchlow, who finished second in France two weeks ago with a broken leg, qualified fourth for Tech3 Yamaha. Compatriot and team mate Bradley Smith, who suffered a scaphoid fracture to his left wrist on Friday, starts 11th.
American Ben Spies earlier withdrew from the race after complaining of continuing pain from an injury that has forced him to miss the last two rounds for the non-works Pramac Ducati team.