Pastor Maldonado will start the Spanish Grand Prix from pole position, after the announcement Lewis Hamilton will start last following a penalty.
Lewis Hamilton's final lap of the day was four-tenths of a second faster than second-place Maldonado, and was set to be McLaren's 150th pole position.
But Hamilton was handed a grid penalty after stopping on his return to the pits. He will now start from the back of the grid.
Maldonado has now inherited pole position. He had been quick in practice but this is a stunning result for Williams, and a career best for the Venezuelan driver. A Williams driver hasn't been on pole since Nico Hulkenberg in 2010 for the Brazilian Grand Prix.
Alonso will start his home Grand Prix in second, ahead of Lotus teammates Romain Grosjean and Kimi Raikkonen and Sauber's Sergio Perez.
Nico Rosberg was the only other driver to set a time in the final qualifying session. He starts ahead of Sebastian Vettel, Michael Schumacher and Kamui Kobayashi.
The biggest casualties of the day were Jenson Button and Mark Webber, who failed to make it into the final qualifying session. They will start from 10th and 11th respectively.
Felipe Massa will start from 16th for Ferrari, just ahead of fellow Brazilian Bruno Senna, who was caught out in the first qualifying session. He went off in the final few minutes while battling to get into Q2, and will start the race from 17th place.
Narain Karthikeyan didn't meet the 107 per cent requirements, but the stewards have announced that the HRT driver will be allowed to race.
Did you watch the qualifying session? Who was your driver of the day? Who should have done better? And what are your predictions for the race tomorrow? Tell us your thoughts below.