Hamilton handed unlikely triumph in dramatic Baku finale
Sebastian Vettel messed up an overtake attempt before Valtteri Bottas sustained a puncture, enabling the world champion to steal a win in Baku.
Lewis Hamilton snatched an unlikely victory at the Azerbaijan Grand Prix after Mercedes team-mate Valtteri Bottas was forced to retire with just three laps to go in a dramatic finale in Baku.
Defending Formula One champion Hamilton benefited from Sebastian Vettel locking up when attempting to overtake Bottas at the restart following a late safety car, before the Finn sustained a puncture after appearing to drive over some debris.
The Briton consequently had his first win in seven races handed to him, with Kimi Raikkonen taking second and Sergio Perez securing the last step on podium.
Hamilton moved to the top of the drivers' standings, opening a four-point advantage over Vettel, who had to settle for fourth and will no doubt be frustrated at seeing victory slip through his fingers.
The late safety car was deployed as a result of Daniel Ricciardo slamming into the back of Red Bull team-mate Max Verstappen with 11 laps remaining, the duo having battled fiercely all race and already made contact once.
Romain Grosjean sent his Haas careering into the wall to reduce the laps for racing further, and the misfortune of Vettel and Bottas meant it was Hamilton who somehow came out on top for his first podium in Azerbaijan and Mercedes' maiden win of 2018.
After managing his tyres brilliantly for 40 laps, Bottas took full advantage of the safety car to switch to the ultrasoft compound - as the rest of the top four did - and retain his lead over Vettel, who had already pitted once.
He lost out in a similar situation in China and will have been expecting to sew up his first win of the season when the racing restarted with just four laps to go.
However, debris seemingly left after Grosjean drove into a wall put paid to his hopes and he consequently failed to finish at all.
It did not take long for the Azerbaijan Grand Prix to live up to its reputation for high drama.
Sergey Sirotkin collided with Fernando Alonso on the run down to turn three and was forced to retire, while Raikkonen hit Esteban Ocon - an incident that is set to be investigated - to end the Force India driver's race prematurely.
Verstappen and Ricciardo had already made contact once and went close another time before they eventually collided at turn one of lap 40.
Ricciardo initially moved to go down the outside of his team-mate but then jumped down the inside and the Dutchman followed him across.
The Australian, the winner last time out in China, did not back off and ended up smashing into Verstappen as he broke for the corner.
All the late drama at the front enabled Charles Leclerc and Brendon Hartley to climb positions and secure their first F1 points.
Sauber driver Leclerc continued his impressive debut season by taking sixth, while Hartley came home 10th to get off the mark.
Having snuck a win in Baku, Hamilton will hope to be as imposing as he was last year when F1 heads to Barcelona for the Spanish Grand Prix. The Mercedes driver sat on pole, had the fastest lap and topped the podium in Catalonia in 2017