Championship leader Fernando Alonso of Ferrari secured pole position on Saturday for the German Grand Prix, while two-time defending world champion Sebastian Vettel came second in his bid to win his home Formula One race for the first time.
Vettel's Red Bull teammate Mark Webber of Australia, who won the British Grand Prix two weeks ago, was third fastest but will be dropped five places on Sunday's grid because of a gearbox change.
As a result, seven-time Formula One champion Michael Schumacher of Germany move up from fourth to third in his Mercedes. putting him in position to win a record fifth race on the Hockenheim circuit.
Schumacher still has to win a grand prix in the third season of his comeback.
Alonso has a 13-point lead over Webber heading into the 10th of 20 races this season and is looking for his third win of the year after victories in the Malaysian and European Grand Prix.
Alonso, who now has 22 poles in his career to go with 29 wins, clearly didn't enjoy driving on Saturday's water-logged circuit - despite taking pole position.
''It wasn't fun for sure,'' the Spaniard said.
Nico Hulkenberg of Germany was fifth fastest for the session in his Force India and Pastor Maldonado of Venezuela came in sixth in his Williams. Both will also move up a position after Webber's penalty.
Alonso and his rivals could have an easier time Sunday, with the weather forecast predicting dry weather.
''The conditions were on the limit but they were the same for everybody,'' Alonso said. ''There was a lot of aquaplaning.
''I think we made a good strategic position to stop and change tires late in the third session, that helped us a lot.''
After a dry first session, a loud burst of thunder foretold what was to follow - a heavy storm that drenched the circuit during the second session. The cars began slipping all over the track, but there were no major incidents.
The rain stopped in time for the third session, though the track remained covered by water.
''Extremely tricky conditions, it was a bit like a lottery. You could lose the car without making a mistake,'' said Vettel, whose hometown is 30 minutes away.
As the drivers raced to get better times on the drying track late in the qualifying, Vettel lost time with teammate Webber in front of him.
''I probably lost a good lap there, but it's not his fault, you can't see anything in your rearview mirror because of the spray,'' Vettel said.
''Maybe I could have gone faster but we'll never know if it would have been enough to beat Fernando.''
Webber said he was pleased with his run, despite losing five places.
''I am happy to be quite a way up there in these dodgy conditions,'' the Australian said.