Valtteri Bottas claimed his first Formula 1 pole position by edging out Mercedes team-mate Lewis Hamilton in a tight Bahrain Grand Prix qualifying battle.
Hamilton had taken pole for each of the first two F1 races of 2017 and led the way again through Q1, Q2 and the initial runs in Q3 at Sakhir, but Bottas hit top spot on his final run with a lap of 1m28.769s.
Hamilton dropped a chunk of time in the second sector of his final lap, and also had an oversteer moment at the final corner, so failed to improve. He ended up second fastest by just 0.023 seconds.
Ferrari's Sebastian Vettel was almost half a second further back in third, suggesting he "tried a bit too hard" on his final Q3 run, which was slower than his first.
Daniel Ricciardo's Red Bull split the two Ferraris by setting the fourth fastest time on his final run, just 0.022s clear of Kimi Raikkonen.
Max Verstappen was a tenth further back in the second Red Bull, while works Renault driver Nico Hulkenberg beat Felipe Massa's Williams to the seventh fastest time, with a lap that was within two tenths of Verstappen's.
Romain Grosjean again got the Haas team into Q3, ending up eighth fastest, well down on Massa and three tenths clear of Jolyon Palmer's Renault.
Palmer made Q3 for the first time in his F1 career, but eventually qualified over 1.2s down on Renault team-mate Hulkenberg.
Toro Rosso's Daniil Kvyat missed out on making the top-10 shootout by less than half a tenth of a second, running wide at the final corner and failing to improve on his final Q2 run.
Lance Stroll made only one run after his Williams spent a long period receiving adjustments in the garage and he ended up only 12th fastest.
Returnee Pascal Wehrlein qualified a brilliant 13th in the Sauber, on a track he starred at last season for Manor, ahead of the Force India of fellow Mercedes junior Esteban Ocon, and the McLaren-Honda of Fernando Alonso, who didn't set a time in Q2 after "we broke the power unit".
Alonso scraped his McLaren-Honda into Q2 thanks to the Toro Rosso of fellow Spaniard Carlos Sainz Jr stopping at the final corner in the dying moments of Q1.
This relegated Sainz to 16th thanks to rivals earlier improving their times, and it also forced Sergio Perez to back off while on a hot lap in his Force India.
Perez still improved by nearly four tenths of a second, but this still left him down in 18th place, 0.005s behind the second McLaren-Honda of Stoffel Vandoorne, who had outpaced Alonso fractionally during the initial runs in Q1.
Marcus Ericsson was only 19th quickest, over half a second slower than Sauber team-mate Wehrlein, while Haas's Kevin Magnussen qualified slowest of all after aborting his final flying lap for the yellow flags displayed for Sainz's stricken Toro Rosso.