Jorge Lorenzo obliterated the Misano lap record to take MotoGP pole for the San Marino Grand Prix, while championship leader Marc Marquez crashed.
Marquez got close to Lorenzo's two-year-old lap record on his first attempt at the start of Q2, missing out by just two-tenths with a 1:32.016s to set the early pace.
But Lorenzo eased clear of his future Honda team-mate, guiding his Ducati to a 1:31.763s to dip underneath the lap record straight away.
Attempting a three-run strategy, Marquez crashed going through the fast Turn 15 on his second flying lap, while Pramac's Jack Miller moved up to second at the same time.
Marquez was able to get back to his garage for his second bike, and set the fastest first sector split on first flying lap since the crash. However, he bled time across the remainder of the tour, and was left with just one more attempt to seize pole.
On his final lap, Lorenzo lit up the timing screens and managed to go even quicker than his earlier benchmark with a 1:31.629s to cement his third pole of the season by 0.287s from Miller.
Marquez was unable to improve on his final lap and a charge from the Ducati of Andrea Dovizioso shuffled the Honda man down onto the second row.
A final effort of 1:31.950s from Maverick Vinales on the Yamaha to third saw Marquez pushed down a place further to fifth, with Dovizioso and LCR's Cal Crutchlow – who crashed late on – flanking him on row two.
Vinales' lap forced his Yamaha team-mate Valentino Rossi back to the head of row three in seventh for his home race, with the second Pramac Desmosedici of Danilo Petrucci and Tech3's Johann Zarco behind.
Alex Rins headed Q1 pacesetter Dani Pedrosa to round out the top 10, while Pedrosa's fellow Q1 graduate Franco Morbidelli was left in 12th after a fall at Rio in the closing seconds.
Andrea Iannone sat second at one stage during the first part of qualifying, but his 1:32.566s was not enough to keep him there as Q1 drew to a close, leaving the Suzuki man in 13th.
Ducati wildcard Michele Pirro's charge for a place in Q2 was halted by a late tumble at Tramonto. The Italian could not advance on 14th as a result, with Ducati stablemate Alvaro Bautista and Aprilia's Aleix Espargaro forming up behind.
Bautista's Nieto teammate Karel Abraham [24th] also suffered a fall at the end of the session, the Czech rider coming unstuck at Carro just seconds before Pirro crashed. Avintia stand-in Christophe Ponnson brought up the rear of the 26-rider field, 4.6s off of Q2 progression.