Lewis Hamilton was handed victory in a madcap finish to a chaotic, incident-strewn Azerbaijan Grand Prix during which both Red Bulls sensationally collided with each other.
Hamilton’s team-mate Valtteri Bottas was on course to win after Mercedes took advantage of a late safety car to jump long-time leader Sebastian Vettel’s Ferrari.
But, after Vettel had thrown away second place with a mistake at the restart, Bottas suffered a puncture on the next lap.
His two rivals out of the way, Hamilton was given victory and the championship lead on a plate after looking set to finish third.
The late safety car had been triggered by a crash between the two Red Bulls, when Daniel Ricciardo slammed into the back of team-mate Max Verstappen while trying to pass into the first corner.
There will be recriminations at Red Bull, whose drivers had appeared on the edge of a crash for much of the race as Ricciardo fought to pass Verstappen and the Dutchman defended right on the edge of acceptability, and some might say beyond.
Red Bull are well known for employing two drivers who fight fiercely on track, but there has not been a coming together of this magnitude since Vettel and Mark Webber ended each other’s race during the Turkish Grand Prix in 2010.
But although their incident – for which they both received a reprimand from race stewards – will generate headlines they had a bit part in a race that for so long Vettel looked to have in a headlock.
The German led from pole and, after a safety car was triggered by several first-lap crashes, built a three-second lead on the first racing lap.
Hamilton could not quite stay with Vettel and his hopes appeared to be over when he locked his wheels going into Turn One on lap 22.
That forced him to stop for fresh tyres and demoted him to third place, and now there was a cat-and-mouse game between Vettel and Bottas.
Vettel and Ferrari stuck it out with a conventional strategy, stopping on lap 28 for soft tyres, while Mercedes left Bottas out hoping for a safety-car period.
It came, thanks to the Red Bulls, as Ricciardo cannoned into the back of Verstappen.
As a stop under the safety car costs less time than one in racing conditions, Bottas was able to emerge in the lead.
The question of whether he could hold off Vettel in what appeared to be a faster car became academic when the German lunged for the inside at the restart with four laps left and ran wide, letting Hamilton and the second Ferrari of Kimi Raikkonen through. Force India’s Sergio Perez moved past into third soon afterwards.
Bottas then seemed set for the win, but ran over debris on the next lap and suffered a major tyre failure as he passed the pits with three laps to go.
Hamilton, who took his first win since last October’s US Grand Prix and a four-point championship lead over Vettel, was disbelieving afterwards.
“Really quite an emotional race,” he said. “Valtteri did such an exceptional job and really deserved the win. I was very fortunate. It feels a bit odd, but I’ve got to take it.”