Valtteri Bottas took pole position for the Portuguese Grand Prix on Saturday and denied Mercedes team mate Lewis Hamilton a record-extending 100th by a mere 0.007 of a second.
Max Verstappen had his first flying lap of one minute 18.209 deleted for running too wide. But for that mistake on a gusty afternoon at a rollercoaster of a circuit, the Dutch youngster's time would have been the fastest.
Bottas took pole in 1:18.348. It was the 17th pole position of Bottas's career, lifting him level with Britain's triple champion Jackie Stewart in the all-time list, and first since Bahrain's Sakhir Grand Prix last December.
Hamilton wants new Mercedes contract before summer break
The Finn will also be the third different driver to start on pole in three races and nobody has so far won from the top slot in 2021.
"Feels like it's been a while. It (qualifying) has been a weak point for me in the first two races. The team have been working hard all weekend and we have a good position for tomorrow," said Bottas.
The Finn could also thank his mechanics who won their own race against time to get the car ready for the session after Mercedes detected a problem with a gearbox sensor and had to swap it out.
Hamilton, who took his 99th pole at the previous race in Imola won by Verstappen, had been fastest in the second phase of qualifying but could not find anything extra in the final minutes.
"It was not the perfect lap but I gave it everything," said the Briton.
Verstappen's Mexican team mate Sergio Perez will join him on the second row with Ferrari's Carlos Sainz fifth and Alpine's Esteban Ocon filling the third row.
There was disappointment for Australian Daniel Ricciardo who failed to get his McLaren beyond the first session and will start back in 16th place.
Williams driver George Russell, who was involved in a high-speed collision with Bottas at Imola that ended the race for both of them and wrecked the Finn's car, had a good afternoon and starts 11th.
Spanish Grand Prix
Hamilton overtakes Verstappen to win Spanish GP
Spanish Grand Prix
Lewis Hamilton wins Formula 1 Spanish GP - As it happened