Max Verstappen secured his sixth pole position of the season for the Azerbaijan Grand Prix after a crash-marred qualifying session in Baku on Saturday.
Red Bull's reigning world champion edged Spaniard Carlos Sainz of Williams and New Zealander Liam Lawson of Racing Bulls in a chaotic session which saw seven crashes.
World championship leader Oscar Piastri crashed in Q3 and will start from ninth on the grid, two places behind McLaren teammate Lando Norris.
While the battle for pole position usually lasts an hour, this time it lasted almost two hours due to the time needed to remove the crashed cars, clean up debris scattered across the track, and repair crash barriers.
Red Bull's four-time champion made the most of treacherous damp conditions to end a near-crazy two-hour session on top.
The Dutchman clocked a best lap in one minute and 41.117 seconds to finish 0.478s ahead of Williams' Sainz and half a second clear of Racing Bulls' rookie Lawson, who secured his best qualifying result.
Sainz had made the most of his opportunity in Q3 to go quickest before Ferrari's Leclerc crashed to bring a sixth red-flag stoppage that wrecked his hopes of a fifth straight Baku pole – and deliver a mixed up grid.

Mercedes' under-pressure rookie Kimi Antonelli and George Russell were fourth and fifth ahead of Yuki Tsunoda in the second Red Bull and Norris, who qualified seventh.
Racing Bulls' second rookie Isack Hadjar was eighth ahead of Piastri and Leclerc with two-time champion Fernando Alonso taking 11th for Aston Martin and seven-time champion Lewis Hamilton 12th for Ferrari.
It was Verstappen's first pole in Baku, his sixth of the season and the 46th of his career.
“It was difficult to get a lap together, with all the red flags,” said Verstappen.
“In the final lap, you just have to send it. I wasn't even on the best tyres. So, I am happy with the weekend.”
The chaos began in gusty conditions with light drizzle expected and rain threatening for Sunday's race.
“We nailed it today by being on the right tyres at the right time,” said Sainz. “So tomorrow I will try to stick it on the podium.”
Ferrari's seven-time world champion Lewis Hamilton qualified a disappointing 12th – after the optimism of going fastest on Friday.
“I honestly thought I was going to be shooting for pole today, so it’s kind of a bit of a shock,” said Hamilton.
“I wish everyone could understand how difficult it was with the wind,” Norris added.
“I don't think we will have the pace to beat Max. I think he's just going to be fast.
“They could easily win at Monza, they could easily win again here. I'm not sure about the win, but we'll be trying to get on the podium.”
Piastri careered heavily into the barriers at turn three, walking away unhurt but causing major damage to his car.
“I'm obviously disappointed with how I performed,” Piastri said.
“There was a bit of rain around, yes. I don't know if that contributed. I don't know if I got a gust of wind. I don't know, I'm never one to blame it on something other than myself.”
