Ferrari’s Charles Leclerc took pole position from Lewis Hamilton and Max Verstappen in a thrilling qualifying session at the Azerbaijan Grand Prix.
Leclerc set his fastest time with the help of a slipstream from Hamilton, and a red flag on the final runs secured his second successive pole.
Hamilton recovered superbly after a difficult weekend for Mercedes while Verstappen will be ruing his luck.
The session had four red flags after a series of crashes on the Baku track.
Red Bull appeared the fastest team heading into qualifying, but they failed to deliver after one of the most disrupted sessions for some time.
And Hamilton had appeared out of the picture in the fight for pole after a troubled weekend for the world champions.
But Mercedes worked wonders to find some pace for qualifying, at least in his car, and with the help of a low-downforce set-up that gave him prodigious straight-line speed.
Hamilton was starting his first qualifying lap as Leclerc was finishing his, and that gave the Ferrari driver a big tow down the pit straight.
It secured the Monegasque his second consecutive pole, although he was unable to reap the benefit of the last one at his home race in Monaco when damage from a crash on his final run was unseen by Ferrari and his car failed on the way to the grid.
Leclerc said: “It was quite a bad lap, I thought. There were two or three corners where I did mistakes but then I had the big tow from Lewis in the last sector which helped me. But I think we would have been in the fight for pole anyway.
“I was improving in the final lap before the red flag but it is like this. It feels very good but on the other hand it is with the red flag again.”
How did Mercedes turn it around?
Hamilton had been third fastest in final practice with a lap that was flattered by a huge tow and the team looked on the back foot going into qualifying.
The two Mercedes drivers split their set-ups, Hamilton running lower downforce than team-mate Valtteri Bottas, and the seven-time champion was quick from the start of qualifying, beating Verstappen to the fastest time in the first session before going on to secure a place alongside Leclerc on the front row.
“We definitely weren’t expecting that and this is such a monumental result for us because we have been struggling all weekend like you wouldn’t believe,” Hamilton said.
“We have made so many changes over these days, chasing our tail, and it has been so difficult and the work overnight and between the two sessions was amazing.
“To be there and so close to these guys is a great, great start.”
Verstappen, who had had a crash himself in final practice and missed the majority of that session, paid the price for a less-than-optimum first lap in the final part of qualifying.
And afterwards he rued the events of the day which saw a total of four red flags as a result of crashes.
Two came in the first part of qualifying when Aston Martin’s Lance Stroll and then Alfa Romeo’s Antonio Giovinazzi crashed at Turn 15 in separate incidents, and another in the second, when McLaren’s Daniel Ricciardo went off at Turn Three.
Verstappen said his first run had been “quite decent but I lacked a tow to the line” and had been hoping to make amends on his final run – but Alpha Tauri’s Yuski Tsunoda crashed at Turn Three and Ferrari’s Carlos Sainz went off in avoiding the incident, resulting in the session being called off.
Verstappen said: “It was a stupid qualifying, to be honest, but it is what it is. We have a good car and everything was working fine.
“It is a street circuit and these things happen and I just hope we can score good points.”
Behind the top three, Alpha Tauri’s Pierre Gasly was outstanding in qualifying fourth, ahead of Sainz and McLaren’s Lando Norris, who was penalised for not pitting immediately after the Giovinazzi red flag.
Norris was given a three-place penalty for the offence, the stewards deciding not to give the usual mandatory five-place penalty because of what they said was the short time he had to react to the situation.
Red Bull’s Sergio Perez was a disappointing seventh after topping final practice, ahead of Tsunoda, Alpine’s Fernando Alonso and Bottas.