Hungarian Grand Prix: Lewis Hamilton takes superb pole in wet conditions
Lewis Hamilton took pole position in an enthralling wet qualifying session for the Hungarian Grand Prix.
The rain gave Mercedes the chance to upend the form book after Ferrari appeared set for pole in the dry.
Hamilton headed team-mate Valtteri Bottas by 0.260 seconds, while title rival Sebastian Vettel could manage only fourth, behind Ferrari team-mate Kimi Raikkonen.
Hamilton leads Vettel by 17 points in the championship heading into the race.
Ferrari dominated the earlier practice sessions, as the Mercedes drivers struggled with a lack of rear grip in hot, dry conditions, with both spinning at the chicane in final practice.
But a rain storm before qualifying doused the track and Hamilton was able to take advantage and what could be a crucial pole on a track where overtaking is notoriously difficult.
Hamilton said: "The Ferraris have been quicker all weekend and we were just trying to be close to them, but the heavens opened.
"It is so tricky out there. It was dry for a part of the lap and then wet. It is really difficult to arrive in the corner and know what grip you have. Then at the end you were just looking for a grippy line.
"It is about give and take, each corner, I was up, I was down, I was up, I was down. It was an emotional rollercoaster.
"We're going to do our best [in the race] to work as a team and keep the red guys behind us."
- All you need to know before the Hungarian GP
- Chequered Flag podcast: 'Mercedes rip up the script'
- How superb qualifying hour unfolded
- Force India asked me to start administration proceedings, says Perez
Starring performances by Sainz and Gasly
Renault's Carlos Sainz produced a strong performance in the wet, qualifying fifth after being second fastest in the second session.
He was ahead of another great drive by Toro Rosso's Pierre Gasly, who beat Max Verstappen of the Red Bull senior team by 0.4secs.
Brendon Hartley made it two Toro Rossos in the top 10, ahead of the Haas drivers Kevin Magnussen and Romain Grosjean.
However, there was more pain for Force India a day after it was confirmed the team had entered administration, with their drivers Esteban Ocon and Sergio Perez eliminated in the first segment of qualifying.
A journey into the unknown
Hamilton and Mercedes were expecting this to be a difficult weekend and braced to lose points to Vettel and Ferrari heading into the four-week summer break after Hungary.
But rain began to fall about half an hour before qualifying and suddenly all bets were off, as Hamilton excels in such tricky conditions.
The first session started damp but dried in the end, Vettel emerging fastest from Red Bull's Verstappen.
The German again topped the second session after a gamble to leave the pits on intermediate tyres when everyone else was on dry-weather 'slick' tyres paid off when rain began to fall again.
The track was drenched in the final sector and while everyone else had to pit immediately for intermediates, Vettel could continue. That guaranteed him the best conditions, and he headed Verstappen, Bottas and Hamilton.
The big loser was Red Bull's Daniel Ricciardo, who came across the crashed Williams of Lance Stroll on his first lap and therefore had to back off. By the time the Australian had finished his next lap, the conditions had worsened and he will start down in 12th.
Renault's Nico Hulkenberg, a wet-weather expert, was another whose departure from the pits was delayed by a problem with a fuel bowser which meant the team could not immediately fill the car.
By the time he got out, it was too wet for a quick lap and the German ended up 13th.
McLaren's Fernando Alonso, who might have been expected to qualify higher than normal in the wet, was another to get out slightly later than most and he ended up 11th.