Tiny margins proved the differential in qualifying for the Azerbaijan Grand Prix, where Valtteri Bottas rode the knife’s edge to take pole but, in stark contrast, Ferrari’s Charles Leclerc pushed too hard and paid the price. Bottas took the top spot with a superb lap in front of his Mercedes teammate, Lewis Hamilton, in second.

Ferrari’s Sebastian Vettel was third and, with his teammate Leclerc crashing out, the Scuderia were left once again licking their wounds as Mercedes made it count when it mattered.

Ferrari had been expected to perform strongly this weekend and had been on top throughout practice – with a huge second and a half advantage in FP3 – but their threat failed to materialise in a session that lasted two hours due to accidents. Leclerc, a hugely promising talent, was one of them in his first major error of the season. He took too much speed into the tight turn eight, locked up and hit the barriers. Ferrari may question whether the medium tyres they gave him for that run in Q2 cost him grip.

He was unharmed but disappointed and admitted his error. “I deserve what happened,” he said. “I have been stupid. Pole was possible after looking at my pace across the weekend. For the next few hours I will be beating myself up.” He finished in 10th.

Bottas, on the other hand, was inch perfect through the twisty old town of the second sector, as he knew he had to be. “It’s all about small margins,” he said. “I got a good tow on the last lap. The corners I had to drive as well but it’s fine details and I hit the sweet spot.”

In fine form this season, Bottas saved his best for last after Hamilton was quickest on the first hot laps in Q3. However, on the final runs Bottas had the advantage. He picked up a tow from McLaren’s Lando Norris and managed to edge out his teammate with a time of 1min 40.415sec, five-hundredths in front of Hamilton.

The British driver may feel his final lap was compromised by being released too close to his teammate on his run but he took it on the chin. “It has been close this weekend. Ferrari looked good and Valtteri did an exceptional job,” he said. “Valtteri is always quick here so I will have my work cut out.”

For Ferrari the result will be disappointing. They had brought aerodynamic upgrades to Baku and Vettel had looked in good form but could not step up to the level of Mercedes, who are going for their fourth successive one-two of the season. “I think they were a bit quicker than us today,” Vettel said. “I had a good lap but I had no tow. I’m happy to get the maximum out of it but from a team point of view we were expecting to have a better session.”

Bottas, however, has an eighth career pole position and his first in Baku, further evidence of the seriousness of his challenge for the title after the strongest start to a season of his career. He trails Hamilton by only six points in the world championship and has good form here. In 2017 he was second and last year was leading the race until a puncture at the end left him cruelly disappointed.

Mercedes have once again given both their drivers the tools to do the job, even when they appeared to be on the back foot. Baku will likely throw up further drama on Sunday but a front-row lockout for what is likely to be a single-stopper puts Bottas and Hamilton in the best possible position to write the script.

Red Bull’s Max Verstappen was in fourth, with Sergio Pérez in fifth for Racing Point. Toro Rosso’s Daniil Kvyat was in sixth with McLaren’s Norris strong again in seventh place. The Alfa Romeos of Antonio Giovinazzi and Kimi Räikkönen were in eighth and ninth. Giovinazzi has a 10-place grid penalty for changing control electronics. Red Bull opted not to run Pierre Gasly in Q2 because he will start from the pitlane as a penalty for having failed to stop at the FIA weighbridge check during second practice.

McLaren’s Carlos Sainz was in 11th in front of the Renault of Daniel Ricciardo. Toro Rosso’s Alexander Albon was in 13th with the Haas of Kevin Magnussen in 14th.

An already testing weekend for Williams became even worse when Kubica crashed out in Q1 clipping the wall on the inside of turn eight. He was unharmed and finished in 20th behind Russell. Lance Stroll in the Racing Point was in 16th in front of the Haas of Romain Grosjean and The Renault of Nico Hülkenberg.