Mercedes driver Michael Schumacher sensationally took pole position at the Monaco Grand Prix but will start from sixth place after a grid penalty.
Red Bull's Mark Webber will be on pole position after losing out to the veteran German by 0.08 seconds.
Schumacher's team-mate Nico Rosberg was third ahead of McLaren's Lewis Hamilton and Lotus's Romain Grosjean.
Jenson Button, 13th fastest, will start 12th after a grid penalty for Pastor Maldonado.
Mercedes team boss Ross Brawn said: "I have to admit I had a bit of a tear in my eye. He's faced some tough times since his comeback but he has been in good shape all weekend."
Schumacher added: "I'm more than thrilled to manage pole position here. It is the race you want to do well at and after what I have been through in the last two years it is just fabulous.
"It confirms what I have felt for a long time, but sometimes you have to put everything in the right moment together."
The top three drivers were covered by just 0.147 secs in an intense qualifying session, in which Ferrari's Fernando Alonso finished sixth.
The Spaniard will be the final person to be promoted following Schumacher's penalty, which was for running into the back of Williams driver Bruno Senna at the previous race in Spain.
Alonso's team-mate Felipe Massa was seventh, ahead of Lotus's Kimi Raikkonen, Maldonado - who will start 24th after a 10-place grid penalty for his clash with Sergio Perez and a further five-place penalty for a gearbox change - and world championship leader Sebastian Vettel's Red Bull.
Hamilton said: "Very exciting, massively tough, but it was so much fun. We struggled a little bit in the middle and last sector. It was more the low-speed corners were not as quick.
"But I'm fortunate to have Michael having the penalty so I'm happy."
Webber, for whom this will be the first pole of the season, said: ""It is Michael's day. A good lap from him. It was an amazing session, wasn't it?
"Q3 was tight between the first few rows, there were some different tyre strategies going on, it was a good little battle.
"It was a good lap and it's nice to start up the front."
Schumacher's performance was the perfect answer to the criticism he has received in recent weeks.
Most recently, Nick Fry, the chief executive officer of the Mercedes team, had admitted that Schumacher would have to think about whether he wanted to continue into a new contract next season if his results did not improve.
The seven-time world champion has shown inconsistent form this season, strong in some races, but some way off the pace of Rosberg at the Chinese Grand Prix, when the younger German took a dominant victory.
He said: "I leave it to others to say what it means," adding: "I'm grateful for all the trust Mercedes had in me.
"I saw my time on the dashboard but as I was one of the first out on the track you don't know what is going to come behind. Then I saw P1 on the dashboard. It's just beautiful."