Lewis Hamilton and McLaren took pole position for the Spanish Grand Prix by a commanding margin over surprise front row man Pastor Maldonado, driving for Williams.

In a session full of surprises, Hamilton was half a second quicker than Maldonado, who had been rapid in final practice, topped Q2, and then held provisional pole for a while.

Hamilton was the only front-runner to do two runs in Q3, and his initial benchmark stood until first local hero Fernando Alonso in the much improved Ferrari, then the incredible Maldonado beat him. But there was still more to come from Hamilton, who produced a 1m21.707s to give McLaren its 150th Formula 1 pole. The Briton then stopped on track on his slowing-down lap.

Just behind Maldonado, Alonso held second ahead of Lotus teammates Romain Grosjean and Kimi Raikkonen, who again proved extremely competitive.

Both Saubers made it into Q3, with Sergio Perez going on to take sixth, but Kamui Kobayashi consigned to 10th as his car expired on the way back to the pits at the end of Q2.

Nico Rosberg was seventh after just one early run in Q3, while both Sebastian Vettel (Red Bull) and Rosberg's Mercedes teammate Michael Schumacher chose to save tires and not doing any flying laps in Q3, so qualified eighth and ninth.

The presence of the underdogs in the top 10 inevitably meant some big names were squeezed out in Q2, and it was Jenson Button – who had been uncomfortable with the McLaren's handling all day – and Mark Webber who found themselves on the wrong side of the cut-off. The McLaren and Red Bull will share row six, double Catalunya polesitter Webber having been sat in the pits at the end of the session as others improved and pushed him backwards.

It was a bad day for Felipe Massa as well, the Ferrari driver registering his worst grid position so far in this already disappointing season as he qualified behind the Force Indias and Toro Rossos in 17th.

While Maldonado (RIGHT) stormed toward the front, his Williams teammate Bruno Senna pushed too hard in his efforts to keep up, spinning into the gravel at the end of Q1 and ensuring an instant exit.

Vitaly Petrov outqualified Caterham teammate Heikki Kovalainen for the first time as the back-of-the-grid teams lined up in the usual order. Charles Pic was quicker than fellow Marussia man Timo Glock, and HRT's Narain Karthikeyan will needs stewards' permission to race as apparent mechanical issues left him a long way from the 107 percent margin.

Pos  Driver                Team                 Time               
 1.  Lewis Hamilton        McLaren-Mercedes     1m21.707s
 2.  Pastor Maldonado      Williams-Renault     1m22.285s       
 3.  Fernando Alonso       Ferrari              1m22.302s
 4.  Romain Grosjean       Lotus-Renault        1m22.424s
 5.  Kimi Raikkonen        Lotus-Renault        1m22.487s
 6.  Sergio Perez          Sauber-Ferrari       1m22.533s
 7.  Nico Rosberg          Mercedes             1m23.005s
 8.  Sebastian Vettel      Red Bull-Renault     No time
 9.  Michael Schumacher    Mercedes             No time
10.  Kamui Kobayashi       Sauber-Ferrari       No time
Q2 cut-off time: 1m22.904s                                    Gap **
11.  Jenson Button         McLaren-Mercedes     1m22.944s   +  0.839
12.  Mark Webber           Red Bull-Renault     1m22.977s   +  0.872
13.  Paul di Resta         Force India-Mercedes 1m23.125s   +  1.020
14.  Nico Hulkenberg       Force India-Mercedes 1m23.177s   +  1.072
15.  Jean-Eric Vergne      Toro Rosso-Ferrari   1m23.265s   +  1.160
16.  Daniel Ricciardo      Toro Rosso-Ferrari   1m23.442s   +  1.337
17.  Felipe Massa          Ferrari              1m23.444s   +  1.339
Q1 cut-off time: 1m24.362s                                    Gap *
18.  Bruno Senna           Williams-Renault     1m24.981s   + 2.398
19.  Vitaly Petrov         Caterham-Renault     1m25.277s   + 2.694
20.  Heikki Kovalainen     Caterham-Renault     1m25.507s   + 2.924
21.  Charles Pic           Marussia-Cosworth    1m26.582s   + 3.999
22.  Timo Glock            Marussia-Cosworth    1m27.032s   + 4.449
23.  Pedro de la Rosa      HRT-Cosworth         1m27.555s   + 4.972
24.  Narain Karthikeyan    HRT-Cosworth         1m31.122s   + 8.539

107% time: 1m28.363s
* Gap to quickest in Q1
** Gap to quickest in Q2