Mercedes' Lewis Hamilton took his fourth straight pole position in 2015 as he beat Ferrari's Sebastian Vettel in Bahrain Grand Prix qualifying.
Hamilton displaced Vettel by 0.411 seconds with the very last lap of the session as the second Mercedes of Nico Rosberg could manage only third.
Ferrari's Kimi Raikkonen fended off the threat from Williams's Valtteri Bottas and Felipe Massa to go fourth.
The result sets up a fascinating race between Mercedes and Ferrari on Sunday.
Ferrari have shown stronger race pace than Mercedes in practice and the grand prix, which starts at 16:00 BST and is live across the BBC, could be decided on which team can make their tyres last best.
That was the decisive factor when Vettel beat Hamilton to take a surprise victory in the second race of the season in Malaysia three weeks ago.
Rosberg's failure to join his team-mate on the front row raises the possibility of Mercedes using him to help defend Hamilton's lead in the race, a strategy that team boss Toto Wolff has said might be used if the team were facing a strong challenge from Ferrari.
Wolff said before qualifying: "We had a solid gap last year which allowed us to keep the strategy always very neutral.
"This year because Ferrari is clearly there and have won a race and will be very quick around here we could split the strategies in order to win the race. I wish I could guarantee a one-two but it is not going to be the case easy."
Red Bull's Daniel Ricciardo was seventh, ahead of Force India's Nico Hulkenberg, who gave his team by far their best grid result of the year.
Two other notable performances came from Toro Rosso's Carlos Sainz, who took ninth ahead of Lotus's Romain Grosjean, and Fernando Alonso, who got a McLaren-Honda into second qualifying for the first time this season.
The Spaniard was ninth in first qualifying and was 14th in second qualifying, when he improved by 0.2secs on his Q1 time.
Alonso's team-mate Jenson Button will start last after his car broke down on his first lap out of the pits.
Button said: "It's a shame. I had good pace in practice - I was 11th and there was more to come. I can't say what's wrong. I'm guessing it was electrical; the car just shut down."
There were some big scalps in first qualifying as both Pastor Maldonado - who had been the quicker Lotus driver all weekend - and Red Bull's Daniil Kvyat were eliminated.
Maldonado suffered an engine problem and will start 16th, while Kvyat's 17th place was a reflection of a dire weekend so far and a torrid start to his career with Red Bull after being promoted following a strong debut season with Toro Rosso last year.
"I don't know what's going on," Kvyat said. "At the moment it looks like dire straits but things can turn around very quickly.
"There are things from my side that can be better, but both of us - team and driver - need to improve. I think it will come sooner rather than later."