(CNN) -- Ferrari's Fernando Alonso will start Sunday's German Grand Prix from pole position after a classy drive in wet conditions in Saturday's qualifying session at Hockenheim.
The former double world champion and current championship leader sped to his second consecutive pole of the season in a time of one minute 40.904 seconds, holding off Red Bull's Sebastian Vettel who joins the Spaniard on the front row of the grid.
"We made a good strategy call to do a pit stop in Q3 so we could have fresher tires in the last minute. I think that helped us a lot to improve the lap time," Alonso said.
"It has been a strange weekend for conditions on the track, but the car was performing well in both conditions so we will see what happens tomorrow," he added.
Vettel's teammate Mark Webber finished third but will start Sunday's race in eighth after he was penalized for changing his gearbox late on Friday.
The Australian's demotion means Mercedes GP's Michael Schumacher, who crashed into a wall at the end of Friday's practice session, will now start from third.
One place behind is Schumacher's compatriot, Nico Hulkenberg in the Force India car with teammate Paul Di Resta completing a good day for Vijay Mallya's team finishing qualifying in ninth place.
Williams-Renault driver Pastor Maldonado will start in fifth place with McLaren's Jenson Button and Lewis Hamilton immediately behind in sixth and seventh place respectively.
Lotus' Kimi Raikkonen will start from 10th.
Earlier in Q2, heavy rain saw all the drivers scrambling to post a time as track conditions worsened.
Ferrari's Felipe Massa and Nico Rosberg of Mercedes GP were notable casualties of the rain, failing to make it through to Q3.
Massa starts Sunday's race in 14th but Rosberg, who is sixth in the championship standings will start in 22nd place after he, like Mark Webber, incurred a five-place penalty for changing his gearbox.