Championship leader Sebastian Vettel achieved his 48th career pole position in Formula 1 and led a Scuderia Ferrari one-two at the Hungaroring.
Vettel was fastest in final practice earlier, leading the way in Q1, and was the first driver to lap under under one minute, 17 seconds in Q2, before Hamilton made a second run.
The four-time champion then set a time of one minute, 16.276 seconds best on his first run in Q3 to take pole, which proved enough to get the job done despite Vettel lapping slightly slower on his second attempt.
Ferrari team-mate Kimi Raikkonen snatched a brake at Turn 1 on his first run in Q3 so was down in fifth, but The Iceman improved dramatically on his second run to leap into second position, within two tenths of Vettel’s mark.
Hamilton went off at the fast Turn 4 on his first run in Q2 and did so again in Q3. He struggled for grip throughout qualifying, complained of vibrations through the tyres, and ultimately wound up only fourth quickest, more than four tenths of a second off the pace.
Mercedes struggled in the first sector of the lap compared to Ferrari and Hamilton’s team-mate Valtteri Bottas was only third fastest, 0.163 seconds clear of Hamilton.
Max Verstappen was second quickest in Q1 and third in Q2, but Red Bull faded from the pole position fight in Q3.
Verstappen was fifth fastest, a tenth behind Hamilton, while team-mate Daniel Ricciardo was sixth, only 0.021 seconds adrift despite missing most of final practice with a hydraulic problem.
Nico Hulkenberg lapped quicker than Ricciardo in Q2 and ended up best of the rest for Renault in seventh, just under a tenth clear of Fernando Alonso’s McLaren-Honda.
Stoffel Vandoorne made Q3 for the second race in a row and qualified ninth, three tenths behind Alonso.
Carlos Sainz Jr’s Toro Rosso rounded out the top ten.
Renault’s Jolyon Palmer was P11, missing the Q3 cut by a tenth of a second thanks to a superb final flying lap in Q2 from Sainz.
Esteban Ocon was best of the Force Indias in P12, ahead of Daniil Kvyat’s Toro Rosso, Ocon’s Force India team-mate Sergio Perez and Romain Grosjean’s Haas.
Grosjean’s Haas team-mate Kevin Magnussen matched Perez to the thousandth of a second in Q1, but missed the Q2 cut by account of setting his best time later than the Force India driver.
Lance Stroll’s Williams was only 0.007 seconds further back in P17, while emergency stand-in team-mate Paul di Resta outstandingly split the Saubers of Pascal Wehrlein and Marcus Ericsson to qualify P19 for his first Grand Prix since 2013.
Paul di Resta achieved this despite not having driven a 2017-spec Formula 1 car before, and only turning his first laps of the weekend in qualifying after Felipe Massa fell ill in final practice.
The former Force India racer gradually worked down to a time 0.766 seconds slower than Stroll, only 0.029 seconds slower than Wehrlein, and over a tenth clear of Ericsson. Williams rightly called this a “fantastic job” in difficult circumstances.
The Sauber drivers ended up more than seven tenths adrift of Stroll’s Williams, despite planning to run their year-old Ferrari engines at full power for the first time this season, after having cooling updates fitted to the cars.
So a fantastic result for Ferrari. A front row lock-out for the red cars. Sebastian Vettel is in prime spot to extend his championship lead but never discount Lewis Hamilton. Despite qualifying in fourth position, the Mercedes is still the car to beat. Bring on the racing action.
Hungarian Grand Prix, qualifying positions:
1 Sebastian Vettel Ferrari 1m16.276s
2 Kimi Raikkonen Ferrari 1m16.444s
3 Valtteri Bottas Mercedes 1m16.530s
4 Lewis Hamilton Mercedes 1m16.693s
5 Max Verstappen Red Bull-Renault 1m16.797s
6 Daniel Ricciardo Red Bull-Renault 1m16.818s
7 Fernando Alonso McLaren-Honda 1m17.549s
8 Stoffel Vandoorne McLaren-Honda 1m17.894s
9 Carlos Sainz Toro Rosso-Renault 1m18.311s
10 Jolyon Palmer Renault 1m18.415s
11 Esteban Ocon Force India-Mercedes 1m18.495s
12 Nico Hulkenberg Renault 1m17.468s
13 Daniil Kvyat Toro Rosso-Renault 1m18.538s
14 Sergio Perez Force India-Mercedes 1m18.639s
15 Romain Grosjean Haas-Ferrari 1m18.771s
16 Kevin Magnussen Haas-Ferrari 1m19.095s
17 Lance Stroll Williams-Mercedes 1m19.102s
18 Pascal Wehrlein Sauber-Ferrari 1m19.839s
19 Paul Di Resta Williams-Mercedes 1m19.868s
20 Marcus Ericsson Sauber-Ferrari 1m19.972s