Championship leader Fernando Alonso mastered the wet conditions at Hockenheim to grab pole position for tomorrow's German Grand Prix.

After taking top spot on the grid a fortnight ago in the rain at Silverstone, Alonso has now put his Ferrari on pole in back-to-back races, and for the 22nd time in his Formula One career.

The Spaniard was comfortably quicker by half a second than local hero Sebastian Vettel, born just 28 miles away in Heppenheim.

The reigning world champion was forced to settle for second, with Red Bull team-mate Mark Webber third, although the Australian has to serve a five-place grid penalty for a gearbox change.

Webber's penalty means Michael Schumacher jumps up to third in his Mercedes and is joined on the second row by another German in Force India's Nico Hulkenberg.

Williams' Pastor Maldonado will start fifth, and then come McLaren duo Jenson Button and Lewis Hamilton, the former out-qualifying the latter for the first time this season.

However, the duo both proved their tyres struggle in the wet as they found themselves three and a half seconds off the pace of Alonso on the full-wet Pirelli tyres.

With Webber starting eighth, behind him will be Force India's Paul di Resta and Lotus' Kimi Raikkonen.

In between the first two periods a loud rumble of thunder was the pre-cursor to the rain that turned Q2 and Q3 into wet sessions.

As the 15 minutes of Q2 started just as the rain was taking hold, there was a dash out of the pits from all the drivers on the intermediate set of tyres.

It was an attempt to make the most of the track conditions before the circuit became soaked, and for most it proved worthwhile.

Toro Rosso's Daniel Ricciardo missed out on a place in the top 10 by 0.060secs, qualifying 11th ahead of Sauber duo Sergio Perez and Kamui Kobayashi.

The big losers were behind them, with Ferrari's Felipe Massa 14th, followed by Romain Grosjean in his Lotus, Williams' Bruno Senna, and unhappily for Mercedes on home soil, Nico Rosberg.

For Grosjean and Rosberg, their situations are compounded by the fact they both face five-place grid penalties for gearbox changes which will see them start 20th and 22nd.

The end of the opening 20-minute session, that was run in the dry, proved to be a scramble for seven-times champion Schumacher.

Mercedes opted for a major gamble on sending him out for his final run on the medium tyre, for this race the slightly slower of the two on offer.

With others around him on the faster soft compound, Schumacher scraped into Q2 by just 0.055secs, pushing Toro Rosso's Jean- Eric Vergne into the bottom seven for the sixth time in 10 races.

Below the Frenchman Heikki Kovalainen out-qualified Vitaly Petrov for the eighth time, the Finn to start 17th and the Russian 18th.

Marussia's Charles Pic will line up 19th, followed by Grosjean, the second Marussia of Timo Glock, and then Rosberg.

At the back, Pedro de la Rosa maintained his 100% record over HRT team-mate Narain Karthikeyan, with the duo to line up 23rd and 24th.

Alonso, who had claimed after Q2 the track was dangerous given the conditions, was relieved in the end to be on pole as he said: "It was not easy for anybody.

"There was a lot of aquaplaning at turn six, but everything went well for us, backing off in those aquaplaning moments.

"We made a good call to put on fresh tyres (in Q3), the track was better in the closing moments which was good for us to put in a good lap time."

Vettel had appeared to be baulked at one point by Webber towards the end of one lap in Q3, gesticulating to his team-mate down the start-finish straight.

The 25-year-old, though, appreciated the circumstances, saying: "I lost a lap running into him (Webber).

"It was difficult, but it's hard as you can't see anything in the mirrors, and he probably didn't see me.

"The track was better towards the end and the last lap, although mine was not entirely clean. You lost the car a little bit with the rivers of water.

"We had the pace to put the car on pole in the end, and maybe what Fernando did (by changing tyres) was the better way to do it.

"Fortunately we didn't lose the car, we're on the first row which should be good, and we're starting on the inside which should also be good."

Webber is at least in the top eight compared to Grosjean and Rosberg who are at the back of the grid given their penalties.

"It was tricky for all of us, dodgy conditions," said Webber.

"I did a better job than the other guys with a five-place penalty, but we did our best out there.

"Fernando stopped (for new tyres), but ifs, buts, shoulda, woulda, coulda doesn't count. It's now about tomorrow."

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.