Lewis Hamilton beaten to pole by Nico Rosberg in Monaco
Nico Rosberg beat Mercedes team-mate Lewis Hamilton to pole position at the Monaco Grand Prix in controversial circumstances.
The German was quickest on their first runs in final qualifying but then went off at the Mirabeau corner and the caution flags meant Hamilton could not improve.
Race officials cleared Rosberg following an investigation.
Daniel Ricciardo beat Red Bull team-mate Sebastian Vettel to third place.
Red Bull had appeared as if they might challenge Mercedes for pole in Monaco, where their power deficit from their Renault engine does not have as big an impact as at most tracks.
But Ricciardo was 0.395 seconds off Rosberg's pole time.
Instead, it was left to the Mercedes drivers to battle for pole, and Hamilton was clearly unhappy about the way the fight was resolved.
Rosberg was quicker than Hamilton by 0.059secs on the first runs in final qualifying but on his final attempt the German was more than 0.1secs down on his previous best at the first split, which is just after Casino Square, the corner before Mirabeau.
Hamilton was very slightly faster than his own previous lap in that same sector on his final lap, but had to back off because of the waved yellow caution flags that resulted from Rosberg's incident.
Rosberg said: "I just locked up. I thought I was going to hit the tyre wall. I knew I had a banker [lap] so I just tried to push that little bit more and went over the edge."
"Of course I'm sorry for Lewis. I didn't know exactly where he was but once I was reversing I did see he was coming up. Of course that's not great, but that's the way it is."
Hamilton, practically monosyllabic in the post-qualifying news conference, looked extremely unhappy.
"It happens and that was that," he said, adding he was "on target" to get pole before the incident.
"Yeah, it's ironic," he said, in reference to Rosberg taking pole having brought out the yellow flags which forced Hamilton to back off on his fastest lap. "It was OK, I was up a couple of tenths [on my lap]."
The controversy will add spice to the already growing tension in the championship battle between the Mercedes drivers, and makes their battle for victory in Sunday's race a fascinating prospect.
The incident brought back memories of the 2006 Monaco race, when Michael Schumacher deliberately parked his car at Rascasse to prevent Alonso from beating him to pole.
Of the tension between the Mercedes drivers, Ricciardo told BBC Radio 5 live: "I thought I'd be the miserable one in the presser... it was a bit awkward."
Ricciardo was 0.163secs quicker than team-mate Vettel.
The Australian said he hoped to be closer to the Mercedes but made a mistake at Turn Eight, almost losing the rear of the car.
Ferrari's Fernando Alonso was fifth, ahead of team-mate Raikkonen by 0.703secs. Toro Rosso's Jean-Eric Vergne was seventh.
Kevin Magnussen took an impressive eighth for McLaren on his Monaco debut, comfortably beating team-mate Jenson Button, who was knocked out in the second session and will line up 12th.
Toro Rosso's Daniil Kvyat and Force India's Sergio Perez completed the top 10, with the second Force India of Nico Hulkenberg 11th.
Williams driver Felipe Massa was unable to take part in the second session despite making it through in 12th place following an incident with Caterham's Marcus Ericsson.
Massa moved over at Mirabeau to let the Swede through, but Ericsson went in too fast and hit the Brazilian, taking both cars into the barriers.
Williams were unable to get the car back to the pits in time for the second part of qualifying.
Massa's team-mate Valtteri Bottas was 13th.
The stewards later ruled that Ericsson will start the race from the pit lane for causing the crash.