Nico Rosberg won a battle with Mercedes team-mate Lewis Hamilton for pole position at the Bahrain Grand Prix.
The Mercedes were in a league of their own as Red Bull's Daniel Ricciardo took third 0.866 seconds behind Hamilton.
The Briton lost his chance to take pole from Rosberg when he made a mistake at Turn One on his final qualifying lap.
Williams' Valtteri Bottas was fourth ahead of Force India's Sergio Perez, the Ferrari of Kimi Raikkonen and McLaren's Jenson Button.
The second Williams of Felipe Massa was eighth, McLaren's Kevin Magnussen was ninth, ahead of Ferrari's Fernando Alonso, who was out-qualified by Raikkonen for the first time this year.
Alonso said he was losing power progressively from the engine during qualifying and did not yet know why.
That will put the Australian only three places behind team-mate Sebastian Vettel, who qualified 11th after a troubled day.
The world champion failed to get into the top 10 shoot-out as he struggled with a downshift problem and lack of track time following a spin into the gravel in final practice that meant he did not do a qualifying simulation run.
Force India's Nico Hulkenberg and Toro Rosso's Daniil Kvyat will split the two Red Bull drivers on the grid.
Hamilton was fastest in all three practice sessions but come qualifying Rosberg seemed to have the edge, setting the fastest times in the first and second knock-out parts and on the first runs in the top 10 shoot-out.
Hamilton blew one last chance to try to beat his team-mate when he locked a front tyre and ran wide going into Turn One on his final lap.
It was the first time Hamilton had been beaten to pole this season.
"You can't always get it right, but generally I'm happy," said Hamilton afterwards.
"Starting from pole is a great thing but it's a whole different story in the race," said Rosberg. "I did some good [race-simulation] runs yesterday and I'm confident I can stay here for the race."