Nico Rosberg claimed his third Formula 1 pole position in a row in Monaco Grand Prix qualifying, as Mercedes fended off Red Bull's challenge to fill the front row again.
After practice sessions that had suggested a Mercedes versus Ferrari battle, Red Bull raised its game in a qualifying session that began damp and remained drizzly until the end.
Sebastian Vettel and Mark Webber were provisionally first and second following the first Q3 runs, and with the rain appearing set to increase, it looked like Red Bull might have the front row sealed.
But Mercedes found more pace in the last seconds, with Lewis Hamilton first leaping to the front on a 1m13.967s, and then Rosberg pipping him by 0.091 seconds.
Vettel was 0.013s down on Hamilton as he denied Webber third place.
Kimi Raikkonen took fifth for Lotus, while Ferrari had a tough session.
Fernando Alonso could only manage sixth, and his team-mate Felipe Massa did not take part at all as the damage from his practice three crash could not be repaired in time.
McLaren's Sergio Perez and Jenson Button were seventh and ninth, split by Adrian Sutil's Force India.
Jean-Eric Vergne completed the top 10 in a strong performance for Toro Rosso.
There was an element of lottery to getting into the top 10 as Q2 came to a frenetic end, with everyone diving for slicks in the final four minutes and then trying to get the best out of an ever-quicker track.
Romain Grosjean was among those to lose out. His 13th place was an anti-climax after a star Q1 performance, when he had shot to the front briefly on the single flying lap he had time for once Lotus had repaired his practice crash damage.
The other big story of Q2 was Giedo van der Garde's effort. The Dutchman got Caterham through Q1 for the first time in 2013 and was a top-10 factor when Q2 was at its most slippery.
He eventually ended up 15th, beating Q1 pacesetter Pastor Maldonado's Williams. Maldonado was two places behind team-mate Valtteri Bottas.
Also out in Q2 were Nico Hulkenberg and Daniel Ricciardo, who share row six.
Paul di Resta was left enraged with Force India's tactics as he missed the Q1 cut and ended up 17th. Esteban Gutierrez also fell in the first segment, behind Charles Pic in 19th.
Jules Bianchi will join Massa on the back row, having parked on his out-lap with a fire in his Marussia's airbox.
Pos Driver Team Time Gap
1. Nico Rosberg Mercedes 1m13.876s
2. Lewis Hamilton Mercedes 1m13.967s + 0.091s
3. Sebastian Vettel Red Bull-Renault 1m13.980s + 0.104s
4. Mark Webber Red Bull-Renault 1m14.181s + 0.305s
5. Kimi Raikkonen Lotus-Renault 1m14.822s + 0.946s
6. Fernando Alonso Ferrari 1m14.824s + 0.948s
7. Sergio Perez McLaren-Mercedes 1m15.138s + 1.262s
8. Adrian Sutil Force India-Mercedes 1m15.383s + 1.507s
9. Jenson Button McLaren-Mercedes 1m15.647s + 1.771s
10. Jean-Eric Vergne Toro Rosso-Ferrari 1m15.703s + 1.827s
Q2 cut-off time: 1m17.748s Gap **
11. Nico Hulkenberg Sauber-Ferrari 1m18.331s + 2.343s
12. Daniel Ricciardo Toro Rosso-Ferrari 1m18.344s + 2.356s
13. Romain Grosjean Lotus-Renault 1m18.603s + 2.615s
14. Valtteri Bottas Williams-Renault 1m19.077s + 3.089s
15. Giedo van der Garde Caterham-Renault 1m19.408s + 3.420s
16. Pastor Maldonado Williams-Renault 1m21.688s + 5.700s
Q1 cut-off time: 1m26.095s Gap *
17. Paul di Resta Force India-Mercedes 1m26.322s + 2.870s
18. Charles Pic Caterham-Renault 1m26.633s + 3.181s
19. Esteban Gutierrez Sauber-Ferrari 1m26.917s + 3.465s
20. Max Chilton Marussia-Cosworth 1m27.303s + 3.851s
21. Jules Bianchi Marussia-Cosworth
22. Felipe Massa Ferrari