Pol Esaprgaro hit the top of the timesheets at just the right moment as he took advantage of a drying track gaining speed and grip to lead off the MotoGP European Grand Prix from pole position.
The Red Bull KTM Ajo rider timed his final run to perfection to post his best lap of 1m40.434s just ahead of the chequered flag, maximising his chance of keeping hold of the position.
The Spaniard survived a late time attack from Alex Rins who rose to second to take his second pole of the season after also claiming the top spot in Styria.
The Suzuki rider was just 0.041s behind for his best qualifying performance of the season, going one place better than he did when he secured third at the last round after struggling in qualfying all season.
The final front row spot went to Teruel polesitter, Takaaki Nakagami. The LCR Honda rider lead the way briefly before a late fall when he was riding high in first on the timesheets saw him slip out of contention.
That fall brought out the yellow flags, hindering the late run of Johann Zarco. The Esponsorama Racing rider had already demonstrated his ability in the tricky, changeable conditions at Valencia this weekend when he lead FP3 in the morning.
The Frenchman brought that skill to qualifying and although he had to give best on his fastest lap, he kept circulating to improve to fourth and claim the top Ducati honours on the grid.
Championship leader Joan Mir has run a cautious weekend, pulling out of laps to remain crash-free at the smallest sign of a twitch.
The sensible Suzuki man picked up the pace for a fifth place start, while still hunting for his first win of the season.
Aleix Espargaro gave a lively performance on his way to sixth for Aprilia, with Jack Miller, who dominated Friday for Pramac Ducati unable to find that little bit extra as he slid through the patchy wet and dry parts if the track. He starts seventh.
Miguel Oliveira topped FP4 to show what he could do on a damp track, then backed that up by dominating Q1. He returned to tack to post the eighth best time for Red Bull KTM Tech 3.
Teruel race winner Franco Morbidelli was the best of the Petronas Yamaha riders in ninth, with last seasons Valencia pole man Fabio Quartararo struggling down in eleventh as his tough weekend continued.
Andrea Dovizioso was off the pace for the whole session and finished last of the Q2 participants for Ducati, over 1.8s off the pole pace.
Stefan Bradl came incredibly close to making it out of Q1 as he traded the final place in the graduation slots with Zarco. A late crash ended his hopes of progression leaving him 3rd in the session, which translates to 13th on the grid.
Replacing Marc Marquez, he was the best of the Repsol Honda riders – despite chipping away at his time virtually every lap Alex Marquez could only manage a time good enough for 14th on the grid, a slight drop in form after hitting the top ten at the Teruel round.
Maverick Vinales placed 15th after setting the fifth best time in Q1. The result was academic as he faces a pit lane start for using a sixth engine at this round of the championship, with all the riders behind him gaining a grid slot.
His Yamaha team-mate Valentino Rossi lacked track time after missing Friday waiting to return the second negative Covid-19 test needed to participate. His track knowledge saw him not too far off the pace, but will have a lot to do for a podium finish from 18th on the grid.