Lewis Hamilton claimed an unlikely victory in a thrilling Bahrain Grand Prix, as Ferrari's race imploded spectacularly with an engine problem for Charles Leclerc and a spin for Sebastian Vettel.

Leclerc recovered from a poor first lap to dominate the race, before an MGU-H failure robbed his engine of power and left him limping to the finish.

Hamilton's Mercedes closed rapidly on the ailing Ferrari and claimed the lead on the run to the final corner with just 10 laps to go.

Leclerc continued to lose significant pace as the closing stages of the race played out, eventually finishing a bitterly disappointing third but at least claiming a bonus point for fastest lap.

The Ferrari driver managed to avoid losing a podium finish to Max Verstappen's Red Bull-Honda thanks to the race finishing under a safety car following simultaneous breakdowns for the works Renault cars with only a handful of laps left.

Leclerc had recovered superbly from a poor start to dominate most of this race, dropping to third on lap one but quickly repassing Valtteri Bottas and teammate Vettel to reclaim the lead and streaking clear before disaster struck.

Vettel compounded Ferrari's misery by spinning out of third place after being overtaken by Hamilton around the outside at Turn 4 just after the final round of pitstops.

Vettel got his Ferrari pointing the right way again, but his front wing shattered shortly thereafter and he was forced to make an unscheduled third stop, eventually finishing a lowly fifth.

Bottas made it a Mercedes one-two by easily passing Leclerc on the main straight with just four laps left, moments before the Renaults hit disaster.

The Australian Grand Prix winner rose to second with a strong first lap, including passing Leclerc around the outside at Turn 4, but generally struggled for speed and wasn't a match for Hamilton or either of the Ferraris.

Hamilton rose to second by pitting earlier than Vettel at the first round of stops, but struggled to stay on the track, lacked pace and couldn't use his softer tyres to prevent Vettel closing in and using DRS to retake the place around the outside at Turn 4 on lap 23 of 57.

But Hamilton came back at Vettel at the second round of pitstops, attempting a gung-ho move on Vettel at Turn 4 on lap 37, while Vettel's tyres were cold but couldn't quite gain enough momentum to complete the pass at Turn 6.

Hamilton gained DRS on the main straight but couldn't overtake into Turn 1. He went round the outside at Turn 4 again to make the pass while Vettel rotated as he tried to get back on the power at the exit, dropping him down the order.

Lando Norris rounded out the top six for McLaren, after teammate Carlos Sainz's race was ruined by contact with Verstappen while trying to pass the Red Bull around the outside at Turn 4 early on.

Kimi Raikkonen's Alfa Romeo was seventh, ahead of the second Red Bull of Pierre Gasly, while Alexander Albon claimed his first points finish with ninth as Sergio Perez's Racing Point rounded out the top 10 as the Renault drivers both lost likely points finishes before their cars broke down approaching Turn 1.

Cla Driver Chassis Engine Time
1 United Kingdom Lewis Hamilton  Mercedes Mercedes -
2 Finland Valtteri Bottas  Mercedes Mercedes 2.980
3 Monaco Charles Leclerc  Ferrari Ferrari 6.131
4 Netherlands Max Verstappen  Red Bull Honda 6.408
5 Germany Sebastian Vettel  Ferrari Ferrari 36.068
6 United Kingdom Lando Norris  McLaren Renault 45.754
7 Finland Kimi Raikkonen  Alfa Romeo Ferrari 47.470
8 France Pierre Gasly  Red Bull Honda 58.094
9 Thailand Alex Albon  Toro Rosso Honda 1'02.697
10 Mexico Sergio Perez  Racing Point Mercedes 1'03.696
11 Italy Antonio Giovinazzi  Alfa Romeo Ferrari 1'04.599
12 Russian Federation Daniil Kvyat  Toro Rosso Honda 1 lap
13 Denmark Kevin Magnussen  Haas Ferrari 1 lap
14 Canada Lance Stroll  Racing Point Mercedes 1 lap
15 United Kingdom George Russell  Williams Mercedes 1 lap
16 Poland Robert Kubica  Williams Mercedes 2 laps
17 Germany Nico Hulkenberg  Renault Renault  
18 Australia Daniel Ricciardo  Renault Renault  
19 Spain Carlos Sainz Jr.  McLaren Renault  
  France Romain Grosjean  Haas Ferrari