Lando Norris produced a sensational final lap to defeat Max Verstappen and secure just his second Formula 1 pole position in a thrillingly competitive Spanish GP qualifying.
In a session that underlined McLaren's growing strength and the ever-increasing competition at the front of F1 after two seasons of sustained Verstappen-Red Bull dominance, Norris delivered under pressure when it mattered around the Circuit de Barcelona-Catalunya with what he described as a "perfect" final lap of 1:11.383.
Verstappen held provisional pole after the first Q3 laps and improved by two tenths more on his final attempt, but Norris made the difference moments later to claim his second career grand prix pole - three years on from his first at the 2021 Russian GP - by a mere 0.020s.
- When to watch the Spanish GP on Sky Sports
- Mercedes refer Lewis Hamilton 'sabotage' email to police
- Stream every F1 race with NOW Sports Month Membership
- Get Sky Sports F1 | Get Sky Sports on WhatsApp
Mercedes, meanwhile, will start from a second-row lockout after their own improvement continued in a competitive hour when they were a factor throughout. They finished three tenths off pole.
For just the second time in 10 races this season, Lewis Hamilton out-qualified team-mate George Russell and will start from a season-best third.
Mercedes narrowly outpaced Ferrari, with Charles Leclerc and home favourite Carlos Sainz to start fifth and sixth respectively. Despite showing flashes of promise in their upgraded cars, neither Ferrari driver was ultimately a genuine pole contender.
Incredibly, just 0.035s separated those four cars.
Pierre Gasly was a stunning seventh on a morale-boosting weekend for improving Alpine, which also saw Esteban Ocon make Q3 in ninth.
But Sergio Perez, who gave Verstappen a tow on his final lap down the track's main straight in an attempt to aid his team-mate's bid for pole, was only eighth in the second Red Bull and will drop to 11th on Sunday's grid owing to a three-place penalty carried over from Canada.
That will promote Ocon into eighth to form all-Alpine fourth row, Piastri - who finished without a time in Q3 after a disappointing qualifying in the second McLaren - to ninth and Fernando Alonso into 10th on what has proved a difficult home grand prix in his Aston Martin.
Norris' 'perfect' lap not even one Verstappen can match
McLaren's Saturday started in unexpectedly dramatic fashion when a fire broke out in the team's hospitality unit in the Barcelona paddock shortly before final practice.
Norris was among those swiftly evacuated from the pop-up building and, with team members unable to return thereafter, the Briton and team-mate Oscar Piastri were unable to use their driver rooms and prepare for qualifying in exactly the same way as normal.
Not that Norris showed that the change in preparation had any detrimental impact on his performance on track in an MCL38 car that was always expected to suit the kind of high-speed corner sections that the Spanish circuit specialises in.
Although only fourth-fastest in both Q1 and Q2, Norris completed only one run in each session and there, as expected, appeared little to choose between the leading four teams as practice form had indeed suggested.
On the first runs in, Verstappen was again initially faster - by 0.123s - but Norris had moved up into second just ahead of the Mercedes to suggest he would be the Dutchman's closest contender on the decisive final runs.
That certainly proved the case as, despite the world champion's best efforts, Norris ultimately hustled his car to the marginally faster time.
"It was pretty much a perfect lap," said the smiling 24-year-old, who won his maiden grand prix last month in Miami.
"You know when you are on a good lap and you are getting excited.
"But the whole thing went perfectly in the end. Close still but super happy.
"I would say my best pole position. I have not had many but of the ones I have had my best.
"It has been close all weekend but really it was about a perfect lap and that is what I did today."
Hamilton back ahead of Russell as Mercedes' recovery continues
Having had to dismiss wild conspiracy theories over claims of driver favouritism at the team in the news conferences at the start of the event, Mercedes' improving form on track returned to centre stage.
Hamilton topped Q1 before finishing second quickest in Q2, although both those results came after second runs in each session whereas the likes Verstappen and Norris only completed one apiece.
Still, the small gaps to the front had offered hope that Mercedes might even be able to challenge for a second successive pole position after Russell's effort in Canada, but Mercedes were unable to quite go with the top two as the pace ramped up in Q3.
For Hamilton though, the session marked an overdue return to qualifying form in the Mercedes head-to-head. The only time he had previously qualified as the lead Mercedes for a grand prix this year was six races ago at April's Japanese GP.
"For us to be in this position where we get a third and a fourth and are starting to be more consistent in that realm is huge," Hamilton told Sky Sports F1.
"It is getting more and more enjoyable to drive as a race car.
"We are not very far away. I think three tenths, I think the real gap is about a tenth and a half maybe.
"I think Max is particularly fast on long runs, I think their car is still ahead, as is probably Lando's.
"However, I am going into tomorrow to try and win."
Sky Sports F1's live Spanish GP schedule
Sunday June 23
7.45am: F1 Academy Race 2
9am: F3 Feature Race
10.30am: F2 Feature Race
12:30pm: Grand Prix Sunday: Spanish GP build-up
2pm: The SPANISH GRAND PRIX
4pm: Chequered Flag: Spanish GP reaction
Formula 1 heads back to Europe as the championship moves on to Barcelona for the Spanish Grand Prix and the start of a triple-header. Watch every session at the Circuit de Barcelona-Catalunya this weekend, live on Sky Sports F1. Stream every F1 race and more with a NOW Sports Month Membership - No contract, cancel anytime