Lewis Hamilton benefited from a late puncture for his Mercedes-GP teammate Valtteri Bottas to win the Azerbaijan Grand Prix and take the drivers' championship lead in the process.
Bottas had looked on target to triumph in the closing laps until his right rear tyre failed and forced him out of the race.
The Finn had run second for most of the afternoon, but the race had appeared to swing his way when the Red Bull Racing cars of Daniel Ricciardo and Max Verstappen collided on Lap 40, leading to a safety car period.
Bottas was in front at that point, due to long-time race leader Sebastian Vettel having pitted. Vettel had been set to retake the lead, but Ferrari chose to pit Vettel again behind the safety car as Mercedes also brought in Bottas and then Hamilton.
Vettel dropped back to fifth after locking up failing to pass Bottas on the restart, but the race fell Hamilton's way with three laps to go when Bottas endured his tyre woe.
_____________
Read more
Abu Dhabi-backed Louis Deletraz hoping to add to family legacy in Formula One
Max Verstappen's father leads the calls urging Red Bull driver to 'think more'
Daniel Ricciardo proves in China he remains Formula One's ultimate opportunist
_______________
Hamilton said: "Quite an emotional race to be honest. Valtteri deserved to have the win, also Sebastian did a great job. It was very fortunate today, so it feels a bit odd to be here."
Ferrari's Kimi Raikkonen recovered from a first lap clash with Force India's Esteban Ocon to finish second, with Force India's Sergio Perez a surprise third as he passed Vettel and then held off the German in the closing laps.
World champion Hamilton, going for a fifth world title, and fourth in five years, leapfrogged Vettel in the championship standings and leads by four points going to the next race in Spain on May 13.
Carlos Sainz was fifth for Renault with Charles Leclerc sixth for Sauber to score his first points in F1.
The McLarens of Fernando Alonso and Stoffel Vandoorne were seventh and ninth, sandwiching the Williams of Lance Stroll, with Brendon Hartley's Toro Rosso completing the points scoring positions in 10th place.
It was a miserable day for Red Bull, however, as they failed to score any points for the second time in three races.
Ricciardo, who had overtaken Verstappen earlier in the race before falling back behind his teammate during the pit stops, ran into the back of the Dutchman as he tried to overtake him on Lap 40.