Sebastian Vettel clinched pole ahead of the 200th race start of his career after Max Verstappen crashed out in Q1 in Bahrain.
An error from Vettel put team-mate Kimi Raikkonen on provisional pole, but the German responded well with his final attacking lap to secure his 51st career pole and first since Mexico last year by 0.143 seconds.
Raikkonen locked out the front row for Ferrari, with Valtteri Bottas 0.166 seconds off the pace in third. Lewis Hamilton could only secure P4, meaning he will drop down to P9 because of his five-place grid penalty.
Daniel Ricciardo will move up to the second row as a result, despite qualifying P5, but team-mate Verstappen is all the way down in P15 after losing all control after Turn 2 and planting the car into the barrier.
Pierre Gasly continued his excellent showing so far this weekend by finishing best of the rest in the Toro Rosso-Honda.
Ferrari identified a ‘small, electrical fault’ with Vettel’s car after FP3, but his SF71H was ready to go again in time for qualifying under the lights at the Bahrain International Circuit.
The German found himself one tenth off the pace set by Raikkonen after the first hot lap of the evening, but the session was red-flagged with five minutes left on the clock in Q1 as Verstappen crashed out.
The Dutchman got a little too greedy on the kerb and spun out on the exit of Turn 2, sliding through the gravel and going nose first into the barrier.
After a brief delay, the Q1 session resumed with just enough time for one more attack from all-but the top five of Raikkonen, Vettel, Bottas, Hamilton and Ricciardo plus the stricken Verstappen.
A dramatic Q1 knock-out ensued, with Fernando Alonso and Romain Grosjean both setting a 1:30.530 – but because Alonso set his first he ensured Grosjean stayed in the drop zone.
Joining the Frenchman on the sidelines were the Sauber duo of Marcus Ericsson and Charles Leclerc, the latter spinning out on the final corner, plus Williams pairing Sergey Sirotkin and Lance Stroll, the Canadian finishing last of all.
Q2 most notably saw Hamilton re-emerge from the garage with soft tyres bolted on and set his personal best on them, meaning a longer first race stint is in store on Sunday with his five-place grid penalty to contend with.
He made the likes of Ferrari and Red Bull take notice with his first hot lap of Q2, going quickest of all at that stage in the middle sector and finishing just a tenth behind Vettel in then P1 with a 1:28.341 on the quicker supersofts.
Then there was a double blow for McLaren as both Alonso and Vandoorne missed out the top-10 shoot-out and were out-qualified by both Toro Rosso cars.
Brendon Hartley fell agonisingly short of reaching Q3, but Gasly sealed his place with a very respectable lap. Sergio Perez was the other driver eliminated alongside Verstappen, whose fate was long sealed.
In the first hot laps of Q3, Vettel ran wide at Turn 13 which gave Raikkonen the opportunity to put himself on provisional pole by 0.095s. Three tenths covered the Ferraris, the Mercs and Ricciardo in P5 heading into the final lap showdown.
Yet Vettel was able to recover from his earlier error and took pole position by a tenth ahead of his 200th race start. Raikkonen settled for P2 for a Ferrari front row lock-out.
1 Sebastian Vettel Ferrari Ferrari 1’27.958
2 Kimi Raikkonen Ferrari Ferrari 1’28.101 0.143
3 Valtteri Bottas Mercedes Mercedes 1’28.124 0.166
4 Daniel Ricciardo Red Bull TAG 1’28.398 0.440
5 Pierre Gasly Toro Rosso Honda 1’29.329 1.371
6 Kevin Magnussen Haas Ferrari 1’29.358 1.400
7 Nico Hulkenberg Renault Renault 1’29.570 1.612
8 Esteban Ocon Force India Mercedes 1’29.874 1.916
9 Lewis Hamilton Mercedes Mercedes 1’28.220 0.262
10 Carlos Sainz Jr. Renault Renault 1’29.986 2.028
11 Brendon Hartley Toro Rosso Honda 1’30.105 2.147
12 Sergio Perez Force India Mercedes 1’30.156 2.198
13 Fernando Alonso McLaren Renault 1’30.212 2.254
14 Stoffel Vandoorne McLaren Renault 1’30.525 2.567
15 Max Verstappen Red Bull TAG
16 Romain Grosjean Haas Ferrari 1’30.530 2.572
17 Marcus Ericsson Sauber Ferrari 1’31.063 3.105
18 Sergey Sirotkin Williams Mercedes 1’31.414 3.456
19 Charles Leclerc Sauber Ferrari 1’31.420 3.462
20 Lance Stroll Williams Mercedes 1’31.503 3.545