Nico Rosberg won a close fight with Mercedes team-mate Lewis Hamilton and the two Red Bulls to take pole position at the Monaco Grand Prix.
It was Rosberg's third consecutive pole position as Sebastian Vettel edged out Red Bull team-mate Mark Webber to take third.
Vettel's title rivals, Lotus's Kimi Raikkonen and Ferrari's Fernando Alonso, were fifth and sixth. McLaren's Sergio Perez and Jenson Button took seventh and ninth.
Rosberg, who has been the form man all weekend, was just 0.091 seconds quicker than Hamilton. The Englishman edged out Vettel by just 0.013secs.
The first two parts of qualifying were run in mixed conditions, with tyre choice between 'intermediate' tyres and dry-weather slicks tricky. And although the weather dried up for the top 10 shoot-out, and the drivers were able to use slicks throughout, spots of rain did return in the closing minutes.
"The conditions were all over the place," said Rosberg. "Then it started drizzling again so the lap times got a lot slower. It was changing so much - you have to be on the right tyres at the right time. Everything when to plan and the last lap went OK."
Raikkonen and Alonso were separated by just 0.002secs but both were almost a second off pole position.
Completing the top 10, Force India's Adrian Sutil was eighth and Toro Rosso's Jean-Eric Vergne 10th.
"I didn't expect to be here," said Hamilton. "I've been struggling all weekend. The first time I've have that in Monaco. Very happy to be here and lock out the front row."
"I was very close. Mercedes were very quick all weekend," added Vettel. "There was a bit more than a tenth missing and I think I had that today. It didn't come together on the last lap, I can only blame myself for that.
"But I am very happy there is not a Ferrari or Lotus ahead and I think we have a good chance tomorrow to win the race."
The top 10 shoot-out was run in dry conditions after rain affected the first two parts of qualifying.
Caterham's Giedo van der Garde took a career best 15th after making it through first qualifying, helped by Ferrari's Felipe Massa not running.
Ferrari were unable to repair the car in time after the Brazilian had a heavy crash in final practice.
Lotus driver Romain Grosjean, who also crashed in final practice, did just make it out on track and drove extremely well to make it through with just one flying lap.
But he was knocked out in the second session and ended up 13th, blaming traffic. He said he had the pace to qualify on the first two rows.
Force India's Paul di Resta failed to make it past the first knock-out session after his team failed to bring him in for a fresh set of tyres for a quick lap at the end. The Scot ended up 17th.
"I apologise for that; that was a mess," his engineer said over the radio after the session.
1. Nico Rosberg - Mercedes - 1:13.876
2. Lewis Hamilton - Mercedes - 1:13.967
3. Sebastian Vettel - Red Bull - 1:13.980
4 .Mark Webber - Red Bull - 1:14.181
5. Kimi Raikkonen - Lotus - 1:14.822
6. Fernando Alonso - Ferrari - 1:14.824
7. Sergio Perez - McLaren - 1:15.138
8. Adrian Sutil - Force India - 1:15.383
9. Jenson Button - McLaren - 1:15.647
10. Jean-Eric Vergne - Toro Rosso - 1:15.703