Ferrari's Fernando Alonso took his first pole position for nearly two years as he beat Red Bull's Mark Webber at the British Grand Prix.
In a thrilling wet session, which was interrupted for an hour and a half for torrential rain, Alonso beat Webber by just 0.047 seconds.
Mercedes driver Michael Schumacher was third with Red Bull's Sebastian Vettel fourth and Lewis Hamilton eighth.
Hamilton's team-mate Jenson Button will start in 16th.
It was a tough session for the McLaren duo, who will have it all to do on Sunday as they bid to give the home fans a first British winner at Silverstone since 2008.
"It was difficult, it always is in qualifying in the wet," said Hamilton.
"We really struggled in Q3, the tyres wouldn't switch on."
Ferrari's Felipe Massa was fifth ahead of Lotus driver Kimi Raikkonen and Williams's Pastor Maldonado.
British Grand Prix: Alonso's Silverstone pole lap
There was controversy aplenty as Alonso, the world championship leader, was given a lifeline by a decision to stop the second session with six minutes to go at a time when both Ferrari drivers were not in a position to get into the top 10 shoot-out.
And when the session did restart, Alonso only just made it through with his final lap, set when there were yellow caution flags at the penultimate corner.
But race officials decided not to punish him as he did not set his fastest time in that final sector and they felt it was clear he slowed down sufficiently.
Once into the top 10, Alonso won a thrilling battle with Webber to take pole for the first time
since the 2010 Singapore Grand Prix.
Veteran commentator Murray Walker, working as a pundit for the BBC, said: "People query whether Fernando Alonso is the best driver in F1 - I don't, and he has just proved it again."
Two-time world champion Alonso
said: "No secret. Its tricky conditions for anyone. You have to be calm in some difficult moments.
"In Q2 we were on the red flag in positions 15 and 16 Felipe and me. We went though and then in Q3 [it was a] difficult choice between inter and full wet and then when we saw everyone on the inter we relax a little and put a lap together.
"It was not easy. To complete a lap with no huge mistakes is not easy in these conditions. [I'm] Happy to be on pole after nearly two years. In these conditions the qualifying is probably the least important of the year but obviously for visibility it is always better to be on pole."
“People query whether Fernando Alonso is the best driver in F1 - I don't”
Second-placed Mark Webber said: "It was a very tight session. You don't know how it's going, you just focus on yourself.
"In a session like this, it's a huge amount down to the driver to get comfortable in the car. It was nip and tuck with Fernando to get pole."
The second knock-out session was stopped with six minutes and 19 seconds remaining because the conditions were too dangerous to continue.
Ferrari survived a tactical error - rain started to fall more heavily between the first and second sessions but they decided to send their drivers out on the 'intermediate' tyres with shallower treads, rather than the 'extreme' wets.
The decision backfired - by the time Alonso,
the world championship leader,
and Massa fitted the wet tyres the track was much wetter than at the start of the session.
Massa and Alonso were down in 15th and 16th positions when the second session was stopped.
Meanwhile, Button's nightmare recent run continued after he was knocked out in the damp first session after struggling to find grip in the slippery conditions.
The Englishman had looked uncomfortable throughout the first session, hovering around the drop zone.
He came in to fit a fresh set of intermediate tyres in time to do one flying lap at the end of the session.
British GP coverage details
12:05-12:55, BBC One/BBC One HD/online.
12:55-15:30, BBC Two/BBC HD/online/BBC Radio 5 live (from 13:00).
15:30-16:30 BBC Red Button (except on freeview)/online.
19:00-20:00, BBC Three/BBC HD/online
He was on course to easily make it into the top 17 - which would have knocked out Mercedes driver Nico Rosberg - but slowed in the final sector.
There were yellow caution flags as a result of Timo Glock's Marussia spinning on the pit straight but Button said the conditions had got worse at the very end of the lap.
"Yellows but also it got wetter," he said. "I gained 1.8 seconds up to then. It wouldn't have just got me in, it would have put me quickest lap time. It's a pity but definitely wasn't meant to be.
"The only good thing is that I'll have more tyres in the race. These guys are going to be running around for two more sessions, and it's going to be wet tomorrow.
"So, 18th, but I'll have better tyres. But the race will be difficult."
He said he could not get heat into the front tyres - a problem that has been afflicting him on and off for several races.
Button has slipped to eighth in the championship,
62 points behind Alonso, after scoring only six points in the last five races.