Lando Norris put McLaren on pole position for the Spanish Grand Prix on Saturday with Red Bull's triple Formula One world champion Max Verstappen alongside on the front row.
Verstappen had taken provisional pole with a time that looked hard to beat, and went faster with his final effort, but Norris took it to another level to end the session 0.020 quicker than his Dutch rival.
The pole was only the second of the Briton's Formula One career, the last coming at the Russian Grand Prix in 2021.
"It was pretty much a perfect lap. You know when you are on a good lap and you are getting excited," Norris said after setting a time of one minute 11.383 seconds.
"It has been close all weekend but really it was about a perfect lap and that is what I did today."
Championship leader Verstappen had set the standard with a lap of 1:11.673 as his first effort and improved the time on his second run to an impressive 1:11.403.
"I was quite happy in qualifying. I got a nice (aerodynamic) tow from Checo (team mate Sergio Perez) in Q3 (the final phase) but unfortunately it was not enough," he said.
"That's how it goes sometimes, but overall we can still be happy with that performance and it's all to play for tomorrow."
Norris was the fourth different driver on pole in the last four races, another sign of the battle between the top teams getting ever closer and Red Bull's dominance being steadily eroded.
The pole was also a boost for McLaren whose day started with unwanted drama when their paddock hospitality unit caught fire, with one team member taken to hospital as a precautionary measure.
Mercedes's Lewis Hamilton was third fastest and team mate George Russell fourth.
"Slowly the car is crafting into a racing machine with which we can hopefully fight the guys in front," said seven-times world champion Hamilton.
"George did a great job as well so, hopefully, tomorrow we can apply the pressure on the guys in front."
Ferrari's Charles Leclerc and Carlos Sainz, preparing for a home race, filled the third row.
Pierre Gasly boosted struggling Alpine's morale with seventh place on the grid for the Renault-owned team and Perez was eighth but will drop three places due to a grid penalty carried over from Canada.
That will lift Alpine's Esteban Ocon to eighth with McLaren's Oscar Piastri ninth and Aston Martin's home hero Fernando Alonso 10th.