A rain shower at the start of Q3 made it look like Paul di Resta would snatch a sensational pole position for Force India.
But as the track dried up again, the Mercedes and Red Bulls blasted through to demote the Scot to fifth.
Di Resta was the only man to start Q3 on intermediates, and while the other nine drivers slithered helplessly and had to pit again to abandon their slicks, the Force India flew to the top.
It seemed that no one else would have a chance, although Hamilton's Mercedes team-mate Nico Rosberg hinted at a challenge when he got within half a second of the Force India in much worse weather.
While di Resta pitted with pole apparently in the bag, the rain eased completely, and those able to squeeze in a lap at the end were back in pole contention.
It was Rosberg who first deposed the Force India, but he was quickly beaten by first Red Bull's Mark Webber, then Hamilton.
Sebastian Vettel came through 0.2 seconds slower than Hamilton to claim the second front row spot, followed by Webber, Rosberg and di Resta.
Jenson Button put the lead McLaren an encouraging sixth.
Lotus and Ferrari had to settle for rows four and five, with title contenders Kimi Raikkonen and Fernando Alonso back in eighth and ninth positions.
The biggest upset of the wet-but-drying first part of qualifying was Marussia duo Jules Bianchi and Max Chilton plus Caterham's Giedo van der Garde all making it through to Q2.
The trio were the only drivers to try slicks at the end of the session and all jumped up the order, all the way to third in van der Garde's case.
As they progressed, both Williams, both Toro Rossos and Sauber's Esteban Gutierrez were left to rue more conservative tactics as they failed to reach Q2.
With Q2 dry, van der Garde, Bianchi and Chilton lined up in 14th to 16th places.
That still means Caterham will share row seven with a McLaren, as Sergio Perez was the highest-profile driver to fall in Q2.
He starts behind the all-German row six pairing of Nico Hulkenberg and Adrian Sutil.
- Sports & Recreation
- Motor Racing
- Force India
- Nico Rosberg
- Paul di Resta