German GP: Fernando Alonso takes pole position at Hockenheim
Ferrari's Fernando Alonso took pole position in a thrilling wet qualifying session at the German Grand Prix.
Red Bull drivers Sebastian Vettel and Mark Webber were second and third fastest, although the Australian will be demoted five places after a penalty.
McLaren drivers Jenson Button and Lewis Hamilton qualified seventh and eighth but will start a place higher.
Mercedes' Michael Schumacher was fourth at his home race ahead of Force India's Nico Hulkenberg, also a German.
Williams's Pastor Maldonado was sixth, with Force India's Paul di Resta and Lotus's Kimi Raikkonen in ninth and 10th places and the first drivers not to benefit from Webber's penalty for a gearbox change.
Alonso and Ferrari were in imperious form in the wet conditions - the world championship leader did two laps fast enough for pole position and he ended up 0.405 seconds faster than Vettel.
Before the start of the final session, Alonso had said he felt the conditions were too wet for the cars to run.
He said: "It is good to check the circuit conditions and going into Turn 6 it was not easy for anybody.
"There was a lot of aquaplaning and we are doing 180mph there."
He said he felt he might have owed his pole to a decision to come in and fit fresh tyres for two flying laps at the end of the session.
"We made a good strategy call doing a pit stop in Q3 and having very fresh tyres for the last few minutes and that helped us a lot improve the lap time."
Season so far: in numbers
106 - The number of points separating Fernando Alonso from his teammate Felipe Massa. Hamilton leads Button by 42 and Mark Webber is just 16 points ahead of Sebastian Vettel.
Vettel said: "The lap was not completely clean. I think we had the pace to put the car on pole. I think the lap time was possible.
"We have to look at what Fernando said. Maybe that was a better way to do it. We are in the first row which should be good, starting the inside as well so we see what we can do."
At one point in the top 10 shoot-out Vettel was held up behind Webber and he complained on the team radio: "What is Mark doing holding me up?"
Afterwards, he said: "I lost the lap running into him but he had difficulty in these conditions and he probably didn't see me."
Webber said: "It was a very intense, tricky session for the drivers and engineers. It was a challenge for us. Sometimes to be in seventh gear wasn't possible, to use the Kers [power boost] wasn't possible. When you have wheelspin at 180mph it certainly gets your attention.
"But I was happy with my lap, I'm happy to be up here and from eighth we can still have a very good race."
Button complained that McLaren were still having problems getting their wet tyres up to operating temperature, an issue that has afflicted the team all season.
"The thing that really shows it's a weakness we need to improve on is that the pole position guy is three or four seconds ahead so he's obviously getting them [the tyres] working and we're not," he said.
Unlike Alonso, Raikkonen and Button, Hamilton did not come in for a fresh set of wet tyres for a couple of laps at the end of the session.
He had been fastest until three minutes from the end, when he started to slip down the field.
"I'm a bit disappointed with the end result of course," said Hamilton. "But we were looking good in Q1 in the dry and then in Q2 [in the wet] and it was looking OK and then at the end I don't understand how everyone went quite a bit quicker.
"We were a little bit unfortunate. Me and Jenson were the first two out and so we did our last laps first and the track just kept getting better and better.
"I had one lap at the end but I went straight off; it was like driving on ice for us.
"The great thing is we have big DRS down the back straight so hopefully we'll be doing a lot of overtaking [in the race]."
Last five poles at German GP
- 2011 - Mark Webber
- 2010 - Sebastian Vettel
- 2009 - Mark Webber
- 2008 - Lewis Hamilton
- 2006 - Kimi Raikkonen
Rain hit before the start of second qualifying, leading to a mad scramble for all the drivers to get out and set a time before the conditions deteriorated.
The big losers among the top teams were Ferrari's Felipe Massa, Lotus's Romain Grosjean and Mercedes' Nico Rosberg.
All failed to get into the top 10 shoot-out, which was particularly bad news for Grosjean and Rosberg.
They qualified 15th and 17th but will both drop five further places as a result of penalties for changing their gearboxes.
Sergio Perez also drops five places after stewards ruled that he had impeded other cars in qualifying.
The Sauber driver had qualified 12th, but was found guilty of blocking both Kimi Raikkonen and Fernando Alonso in Q2.
German Grand Prix 2012, day two
- Saturday, 21 July: Third practice 09:55-11:05 BST; BBC Sport website and BBC Radio 5 live sports extra. Qualifying 13:00; BBC Sport website and BBC Radio 5 live. Highlights 17:00 BBC Two and BBC HD
German Grand Prix 2012, day three
- Sunday, 22 July: Race 13:00 BST; BBC Sport website and BBC Radio 5 live. Race highlights 17:30 BBC Two and BBC HD. Race highlights repeat 23:40 BBC One and BBC HD