Ferrari's Formula One championship leader Fernando Alonso defied a thunderstorm to take pole position for the German Grand Prix on Saturday.
The Spaniard was joined on the front row by Red Bull's double world champion Sebastian Vettel, who will be attempting to win a Grand Prix in his native Germany for the first time, after qualifying in atrocious conditions.
Vettel's team mate Mark Webber, second in the championship after nine of the 20 races, was third fastest but the Australian will drop five places after being penalised for an unscheduled gearbox change before qualifying.
Seven-times world champion Michael Schumacher, fourth fastest for Mercedes in front of his home fans, will therefore start alongside Force India's Nico Hulkenberg on an all-German second row.
"It was not fun, that's for sure," said Alonso of his second pole in a row, with the other coming at a wet Silverstone two weeks ago, and 22nd of his career.
"When you have this type of conditions it's very difficult to put a clean lap together and very easy to finish in the gravel or in the grass or in the wall.
"It's a bit of a survival moment. You try to complete the lap and whatever the position is, you are happy," added the double world champion.
A huge clap of thunder shuddered over the circuit before the start of the second part of qualifying, announcing a deluge which left pools of standing water all over the track.
Vettel and Webber held the lead before Alonso went in for a new set of extreme wet tyres near the end and came out to produce a stunning lap of one minute 40.621 seconds, four tenths of a second quicker than anyone else.
Alonso said before the start of the final session that he though conditions were too wet to continue.
"We made a good strategy call with a pit stop in the third qualifying session and very fresh tyres and that helped," he said.
"In these conditions it's always a bit of a lottery," said Vettel, who has yet to win a race in July. "You can lose the car without making any mistake."
"There are rivers everywhere, as soon as the car aquaplanes you are a passenger."
Vettel was held up by Webber at one point but said his Red Bull team mate probably had not seen him,
"I think we have shown the car is strong in all conditions," said Webber. "It was an intense, tricky session for drivers and engineers. It was a challenge for us."
"But it's never ideal to put ourselves on the back foot by shooting ourselves in the foot
McLaren pair Jenson Button and Lewis Hamilton, who have had a disappointing last two races, were seventh and eighth fastest after looking quick on Friday with new upgrades but will move up due to Webber's demotion.
Germany's Nico Rosberg, Schumacher's team mate, and French driver Romain Grosjean for Lotus also have five place penalties for Sunday's race due to gearbox changes.
Hamilton said he had paid the price for getting his final lap in before others.
"The track got better and better and I guess the other guys were able to post quicker times after that," said the Briton. "The track was drying so we would have got better if we had one more lap, but it was like driving on ice for us."
Britain's Paul Di Resta was ninth as both the Force India drivers made it into the top 10.