Max Verstappen led a Red Bull one-two as he took pole position for the season-opening Bahrain Grand Prix.
The Dutchman beat team-mate Sergio Perez by 0.138 seconds, with the Ferraris of Charles Leclerc and Carlos Sainz locking out the second row.
Fernando Alonso made an impressive start to his time at Aston Martin with fifth place, ahead of both Mercedes cars.
George Russell beat Lewis Hamilton to sixth place by just 0.044secs.
Leclerc had been second after the first runs in final qualifying, 0.103secs behind Verstappen, but Ferrari chose not to do a second run to enable them to start the race on new tyres rather than used so he lost out on a second chance to try to get ahead.
Red Bull went into the weekend as strong pre-season favourites but they have struggled to make the car handle in a way that satisfied the drivers and had appeared not to have the advantage many expected.
In the end, the grid had a look many would have predicted after testing last week, but Verstappen said it had not been easy.
“It’s been a bit of a tough start to the weekend yesterday and today, not really finding my rhythm,” he said. “But luckily in qualifying we managed to put the pieces together.
“I was positively surprised to be on pole after the struggles we had in practice.”
Perez said: “I don’t remember such a tight qualifying battle from Q1 to Q2 to Q3. In the end, I wasn’t totally comfortable with the balance but to getting this kind of start to the season with the team was really special.”
Leclerc said Ferrari’s decision to pull out of the final battle for pole was based on the knowledge that their tyre wear was not as good as that of their rivals.
“There wasn’t any [technical] issue,” he said. “I think we were in the fight for pole, which was a good surprise after the testing and practices, which were a bit more difficult.
“However, we have to keep in mind that we have been struggling a bit on the long run and I think we are in a better place to start on new tyres.
“It was very close. Aston Martin were very quick, Mercedes were very quick at some times. We are a lot closer than we expected. In the race run, we seem to have bit of a weakness for now. Having a set of new tyres will help us.”
More to follow.