Lewis Hamilton will start from pole position in Sunday's Spanish Grand Prix after edging out Mercedes team-mate Valtteri Bottas by just four hundredths of a second.
Hamilton, who holds a four-point championship lead over Sebastian Vettel, delivered a record-breaking lap of Barcelona's Circuit de Catalunya to claim his first pole since the opening round in Australia.
Vettel has been the one-lap master this year following a hat-trick of poles, but the Ferrari man had no answer for an inspired Hamilton here on Saturday. Vettel will line up in third after qualifying 0.132 seconds slower than Hamilton.
Kimi Raikkonen finished in fourth place for Ferrari, ahead of the Red Bull duo of Max Verstappen and Daniel Ricciardo.
"It was very close but I am very happy," Hamilton said. "I needed this pole because I haven't had one for a while."
Vettel added: "I was happy with the lap. The first run was not so good, but the last lap felt good. Then I looked where I ended up and I saw that my name didn't go to the top. We expected Mercedes to be strong."
McLaren arrived for the opening leg of the European season armed with a series of upgrades and hopeful of turning a corner following their miserable start to the season.
On the fifth anniversary of his last victory in F1, Fernando Alonso ensured a McLaren car progressed to the final phase of qualifying for the first time this year.
The 36-year-old Spaniard will line up in eighth place with his team-mate Stoffel Vandoorne 11th. Progress perhaps, but there is still work to do for the team who claimed they would rival Red Bull this year following their switch from Honda to Renault power.
British team Williams could once boast the might of Nigel Mansell, Alain Prost and Nelson Piquet, who between them shared nine world championships.
But their current line-up of Lance Stroll, the Canadian teenager whose career has been bankrolled by his fashion billionaire father Lawrence, and Russian Sergey Sirotkin, is possibly the worst in the team's history.
Their car is desperately poor this year, too, and they will head into tomorrow's race rooted to the foot of the constructors' championship.
It seems certain they will remain there after Stroll crashed out of qualifying, while Sirotkin was only one place ahead of him. Stroll stepped on to the gravel at Turn 12 and spun into the barriers to bring a premature end to his session.
It marked the third time he has been in the gravel this weekend. "I've never seen a Formula One car crash like that on the exit of Turn 12," Sky Sports pundit Martin Brundle said in bemusement.
Williams will be spared the indignity of seeing both of their cars on the final row of the grid after Brendon Hartley suffered a 160mph crash in final practice.
New Zealander Hartley, 28, was taken to the medical centre for precautionary checks but despite being given the green light to continue his Toro Rosso team were unable to get his severely damaged car ready in time for qualifying.
- Lewis Hamilton (Gbr) Mercedes GP 1mins 16.173secs
- Valtteri Bottas (Fin) Mercedes GP 1:16.213
- Sebastian Vettel (Ger) Ferrari 1:16.305
4 Kimi Raikkonen (Fin) Ferrari 1:16.612, 5 Max Verstappen (Ned) Red Bull 1:16.816, 6 Daniel Ricciardo (Aus) Red Bull 1:16.818, 7 Kevin Magnussen (Den) Haas F1 1:17.676, 8 Fernando Alonso (Spa) McLaren 1:17.721, 9 Carlos Sainz (Spa) Renault 1:17.790, 10 Romain Grosjean (Fra) Haas F1 1:17.835, 11 Stoffel Vandoorne (Bel) McLaren 1:18.323, 12 Pierre Gasly (Fra) Scuderia Toro Rosso 1:18.463, 13 Esteban Ocon (Fra) Force India 1:18.696, 14 Charles Leclerc (Mon) Sauber-Ferrari 1:18.910, 15 Sergio Perez (Mex) Force India 1:19.098, 16 Nico Hulkenberg (Ger) Renault 1:18.923, 17 Marcus Ericsson (Swe) Sauber-Ferrari 1:19.493, 18 Sergey Sirotkin (Rus) Williams 1:19.695, 19 Lance Stroll (Can) Williams 1:20.225, 20 Brendon Hartley (Nzl) Scuderia Toro Rosso No Time
Third practice times
- Lewis Hamilton (Gbr) Mercedes GP 1min 17.281secs
- Valtteri Bottas (Fin) Mercedes GP 1:17.294
- Sebastian Vettel (Ger) Ferrari 1:17.550
4 Kimi Raikkonen (Fin) Ferrari 1:17.581, 5 Daniel Ricciardo (Aus) Red Bull 1:17.981, 6 Kevin Magnussen (Den) Haas F1 1:18.357, 7 Romain Grosjean (Fra) Haas F1 1:18.706, 8 Carlos Sainz Jr (Spa) Renault 1:18.783, 9 Fernando Alonso (Spa) McLaren 1:18.847, 10 Pierre Gasly (Fra) Scuderia Toro Rosso 1:18.886, 11 Nico Hulkenburg (Ger) Renault 1:18.905, 12 Max Verstappen (Ned) Red Bull 1:19.013, 13 Esteban Ocon (Fra) Force India 1:19.121, 14 Stoffel Vandoorne (Bel) McLaren 1:19.236, 15 Charles Leclerc (Mon) Sauber-Ferrari 1:19.292, 16 Sergio Perez (Mex) Force India 1:19.376, 17 Brendon Hartley (Nzl) Scuderia Toro Rosso 1:19.428, 18 Marcus Ericsson (Swe) Sauber-Ferrari 1:19.774, 19 Lance Stroll (Can) Williams 1:19.900, 20 Sergey Sirotkin (Rus) Williams 1:19.909