Valtteri Bottas has taken pole position for the Azerbaijan Grand Prix, beating teammate Lewis Hamilton to the top spot.
Hamilton ended the session less than a tenth down on the Finn, while Sebastian Vettel was third for Ferrari.
There was only one Ferrari competing in the final qualifying session, as Charles Leclerc crashed out at Turn 8 during Q2, eliminating himself after locking up.
There were two red flags during the session, one of which was caused by Leclerc, who admitted fault for the crash.
At the end of Q1, Robert Kubica hit the barrier at the same place Leclerc would crash, continuing Williams' miserable weekend.
Hamilton held the provisional pole spot after the first round of laps in Q3, but lost out to his teammate in the dying moments, with all of the top three improving their times.
Max Verstappen set his two fast laps in succession without pitting and held a front row spot before being pipped by Bottas and Vettel. The Dutchman will start the race from fourth on the grid.
Verstappen's teammate Pierre Gasly didn't advance beyond Q2, as he will start from the pit lane on Sunday for breaching regulations regarding the weigh bridge on Friday afternoon.
Gasly managed to top the opening qualifying session, but didn't set a timed lap in Q2. Sergio Perez was P5, and he will share the third row with Daniil Kvyat in the Toro Rosso.
Lando Norris was the sole McLaren in the final stage of qualifying, and secured P7 for the start of Sunday's race.
Antonio Giovinazzi took his best ever result in qualifying, as he finished eighth, ahead of teammate Kimi Raikkonen.
Giovinazzi received a strong tow from Vettel at both the start and end of his lap to out-qualify Raikkonen for the first time this season. However, he will start towards the back due to a 10-place grid penalty he picked up for taking on a third control electronics.
Renault and Haas struggled again, as Nico Hulkenberg and Romain Grosjean failed to advance out of the first session, joining the two Williams' and Lance Stroll in the drop zone.