Sergio Perez brought an end to his long wait for a first Formula One pole position at the Saudi Arabian Grand Prix, cutting short Ferrari's early-season dominance.
The Scuderia had looked set to continue their outstanding form, potentially locking out the front row in a hectic qualifying session that was delayed for an extended period following a terrifying crash for Mick Schumacher, son of former Ferrari superstar Michael.
Schumacher hit the concrete barrier at Turn 12 at 170mph, although he showed no signs of injury when he was eventually pulled from his Haas, heading to hospital for precautionary scans.
That incident came in the middle of Q2, with Lewis Hamilton having sensationally bowed out in Q1, leaving Ferrari pair Charles Leclerc and Carlos Sainz to battle with Red Bull duo Perez and Max Verstappen.
Defending champion Verstappen struggled to stay in touch, and it had appeared as though Sainz might be the man celebrating a first pole when he set the benchmark in Q3.
But he was passed by team-mate Leclerc and then Perez in his 220th grand prix, marking the longest wait for a driver before qualifying fastest, with ex-Red Bull man Marc Webber (131) the previous record-holder.
With Sunday marking 11 years to the day since Perez's first entry, he said: "It took me a couple of races, no?
"What a lap, unbelievable. I could do 1,000 laps and I don't think I could beat that one. It was unbelievable.
"We were not expecting too much from qualifying, we were focusing mainly for the race, so hopefully we get [the win] tomorrow."
Earlier, there had also been a red flag in Q1 following a crash involving Nicholas Latifi, after which Hamilton could not recover from a slow start.
His third time was his fastest but enough only for P15, where he soon fell below Lance Stroll to bow out in Q1 for the first time since the 2017 Brazilian GP and the first time on pure pace since the 2009 British GP.
Mercedes struggled to explain the result, as George Russell ran fourth fastest in that initial session, and Hamilton would not use the distraction a day earlier – when practice was halted due to a missile attack near the track – as an excuse.
"I just struggled with the balance of the car," Hamilton told Sky Sports. "It's not where we want to be."
PROVISIONAL CLASSIFICATION
1. Sergio Perez (Red Bull) 1:28.200
2. Charles Leclerc (Ferrari) +0.025s
3. Carlos Sainz (Ferrari) +0.202s
4. Max Verstappen (Red Bull) +0.261s
5. Esteban Ocon (Alpine) +0.868s
6. George Russell (Mercedes) +0.904s
7. Fernando Alonso (Alpine) +0.947s
8. Valtteri Bottas (Alfa Romeo) +0.983s
9. Pierre Gasly (AlphaTauri) +1.054s
10. Kevin Magnussen (Haas) +1.388s