Ferrari's Charles Leclerc beat Red Bull's Max Verstappen to pole position in a thrilling qualifying session at the start of Formula 1's new era.
After a difficult session Leclerc put it all together for his final lap and beat the world champion by 0.123 seconds at the Bahrain Grand Prix.
Carlos Sainz had earlier been the faster Ferrari driver but slipped down to third, just 0.129secs off pole.
Lewis Hamilton was fifth for Mercedes behind Red Bull's Sergio Perez.
- Full qualifying results
- Hamilton not carrying baggage after Abu Dhabi
- Hamilton donates 'fine' to FIA scheme
- How to follow the Bahrain GP on the BBC
Hamilton was 0.680secs off pole as Mercedes' pre-event predictions that they were not yet on the pace proved correct.
His new team-mate George Russell was ninth after making an error at Turn One on his only lap in the final session of qualifying.
Russell was beaten by his Mercedes predecessor Valtteri Bottas, an impressive sixth in his first race for the Alfa Romeo team, ahead of the equally impressive Kevin Magnussen on his return to F1 with the Haas team after a year away.
Alpine's Fernando Alonso was eighth ahead of Russell, with Alpha Tauri's Pierre Gasly taking the final place in the top 10.
Ferrari come good in F1's brave new world
This is the first race after the biggest regulation change in 40 years, in which the cars have been fundamentally revised in an attempt to close up the field and make the racing more competitive.
Ferrari have been through a difficult two or three seasons and had targeted this year as a chance to return to the front of F1, so Leclerc was thrilled to see the effort that had been put in had paid off.
"It feels good," he said. "The last years have been incredibly difficult for the team and we were hoping these new rules would be an opportunity for us and we have worked incredibly hard to be in a position to fight for better places."
Leclerc had been the faster Ferrari driver all weekend but struggled in qualifying, losing time to a revived Sainz, particularly in sector one of the lap at the Sakhir circuit as he was unable to generate front-tyre temperature there.
He did improve over the first four corners on his final lap, although he still trailed Verstappen and Sainz there, but the rest of his lap did the trick for him - he was fastest of all through both sectors two and three as he brought all his renowned qualifying skills to the fore.
"It has been a difficult session," he said. "I was not entirely happy with my driving but we managed put it together at the end and take pole.
"We were quite sure Red Bull would be in front but actually when we put everything together the car was very competitive."
Verstappen had looked so strong for much of the session and seemed to feel he and Red Bull had fallen a little short of their ultimate potential.
"It was a bit hit-and-miss," the Dutchman said. "Q2 seemed good, then Q3 was a bit of a struggle to put the balance together. But we have a good car - a good race car as well, which at the end of the day is the most important. A good start to the new era.
"We have a few things to look into and we will try to do better for the next time. A good battle with Charles and Carlos at the end. They did a good job over the winter."
Sainz was simply pleased to be so close to the front after trailing Leclerc through the practice sessions.
"There was that extra tenth Charles managed to extract at the end, but I am really happy with the progress I've made," the Spaniard said.
"I have been very far off all weekend, more than 0.5secs, so to be fighting for pole I was very happy. It's a bit of a shame to miss out. But Charles has been ahead all weekend and he deserved the pole position."
Perez was 0.363secs off Verstappen and was never quite in the fight for pole.
What happened to Mercedes?
Mercedes came into the weekend knowing they were on the back foot because of struggling in testing.
Their car has been suffering aerodynamic problems that make it bounce on the straights - a problem many teams have been encountering, but none worse than Mercedes.
They managed to improve the car over the weekend but Hamilton's sizeable margin to pole is an unfamiliar feeling for the seven-time champion and indicative of the size of the task facing his team as they seek to improve their car over the coming races.
Russell ended up a second slower than his team-mate, suffering for his error on his final lap because Mercedes saved only four sets of soft tyres for qualifying, meaning only one new set in the final session, because they wanted to reserve more sets of the more durable compounds for the race.
The margin between the Ferraris and Red Bulls and the rest of the field is not that different from that between the front and the midfield last year - Bottas in sixth was a second off pole position.
Lando Norris was a disappointing 13th for McLaren as the team struggled in this first race, while his team-mate Daniel Ricciardo was knocked out in the first session and will line up 18th.
And the most disappointed team may well be Aston Martin, whose drivers Nico Hulkenberg and Lance Stroll were both eliminated in the first session and arguably have the slowest car.
Hulkenberg did a good job as a replacement for regular driver Sebastian Vettel, who is missing the race with Covid, to beat Stroll by 0.2secs.
- Becoming Batman: Robert Pattinson reveals all about taking on the role of the caped crusader
- MOTDx: Philippe Coutinho and fan-owned Dublin club Bohemian FC feature on this week's episode