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.
RED BULL WRITE OFF
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.
FIRST FOR LECLERC, HARTLEY
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.
IN THE POINTS
1. Lewis Hamilton (Mercedes): 1:43:44.291
2. Kimi Raikkonen (Ferrari): +2.460s
3. Sergio Perez (Force India): +4.024s
4. Sebastian Vettel (Ferrari): +5.329s
5. Carlos Sainz Jr (Renault): +7.515s
6. Charles Leclerc (Sauber): +9.158s
7. Fernando Alonso (McLaren): +10.931s
8. Lance Stroll (Williams): +12.546s
9. Stoffel Vandoorne (McLaren): +14.152s
10. Brendon Hartley (Torro Rosso): +18.030s
1. Lewis Hamilton (Mercedes) 70
2. Sebastian Vettel (Ferrari) 66
3. Kimi Raikkonen (Ferrari) 48
4. Valtteri Bottas (Mercedes) 40
5. Daniel Ricciardo (Red Bull) 37
1. Ferrari 114
2. Mercedes 110
3. Red Bull 55
4. McLaren 36
5. Renault 35
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