Lewis Hamilton won the Spanish Grand Prix after a close battle with Sebastian Vettel. Picture: Albert Gea / Reuters.

Barcelona - Lewis Hamilton roared back into serious contention for a fourth drivers' world title on Sunday when he drove to a well-judged victory for Mercedes in a dramatic Spanish Grand Prix.

The three-time champion recovered after losing the lead from his 64th pole position to make the most of key strategic decisions and win with power and precision ahead of championship leader Sebastian Vettel of Ferrari.

Hamilton finished the 66-lap contest 3.5 seconds ahead of the four-time champion German, having blasted past him to regain the lead after 44 laps.

It was his second win in five races this year and the 55th of his career and it brought him within six points of Vettel in the title race. The German now has 104 points and Hamilton has 98.

Australian Daniel Ricciardo finished third for Red Bull, more than a minute adrift of the leaders, ahead of Mexican Sergio Perez and his Force India team-mate Frenchman Esteban Ocon.

German Nico Hulkenberg came home sixth for Renault, ahead of compatriot Pascal Wehrlein of Sauber, who lost his place due to a time penalty for a pit-lane mistake during the race.

Spaniard Carlos Sainz was eighth on the road, but classified seventh, ahead of Russian Daniil Kvyat who did a superb job for Toro Rosso after starting at the back of the grid, and Frenchman Romain Grosjean of Haas.

Every driver, apart from those on the podium, was lapped during an exhausting contest that saw Finn Kimi Raikkonen of Ferrari and last year's winner, Dutch teenager Max Verstappen, crash into retirement on the first lap.

Hamilton's Mercedes team-mate, Finn Valtteri Bottas, also retired when his engine failed while he was running third.

"Guys what can I say?" said Hamilton on his team radio. "A fantastic job this weekend –- thank you. The strategy was right on it." -AFP

SPANISH GRAND PRIX RESULTS

1. Lewis Hamilton (Britain) Mercedes 1:35:56.497

2. Sebastian Vettel (Germany) Ferrari +00:03.490

3. Daniel Ricciardo (Australia) Red Bull – TAG Heuer 01:15.820

4. Sergio Perez (Mexico) Force India – Mercedes 1 lap

5. Esteban Ocon (France) Force India – Mercedes 1 lap

6. Nico Huelkenberg (Germany) Renault 1 lap

7. Pascal Wehrlein (Germany) Sauber – Ferrari 1 lap

8. Carlos Sainz Jr (Spain) Toro Rosso – Renault 1 lap

9. Daniil Kvyat (Russia) Toro Rosso – Renault 1 lap

10. Romain Grosjean (France) Haas – Ferrari 1 lap

11. Marcus Ericsson (Sweden) Sauber – Ferrari 2 laps

12. Fernando Alonso (Spain) McLaren 2 laps

13. Felipe Massa (Brazil) Williams-Mercedes 2 laps

14. Kevin Magnussen (Denmark) Haas – Ferrari 2 laps

15. Jolyon Palmer (Britain) Renault 2 laps

16. Lance Stroll (Canada) Williams-Mercedes 2 laps

RETIREMENTS

Valtteri Bottas (Finland) Mercedes 28 laps

Stoffel Vandoorne (Belgium) McLaren 33 laps

Max Verstappen (Netherlands) Red Bull – TAG Heuer 65 laps

Kimi Raikkonen (Finland) Ferrari 65 laps

DRIVER STANDINGS

1. Sebastian Vettel (Germany) Ferrari 104

2. Lewis Hamilton (Britain) Mercedes 98

3. Valtteri Bottas (Finland) Mercedes 63

4. Kimi Raikkonen (Finland) Ferrari 49

5. Daniel Ricciardo (Australia) Red Bull 37

6. Max Verstappen (Netherlands) Red Bull 35

7. Sergio Perez (Mexico) Force India 34

8. Esteban Ocon (France) Force India 19

9. Felipe Massa (Brazil) Williams 18

10. Carlos Sainz Jr (Spain) Toro Rosso 15

11. Nico Huelkenberg (Germany) Renault 14

12. Romain Grosjean (France) Haas 5

13. Pascal Wehrlein (Germany) Sauber 4

14. Kevin Magnussen (Denmark) Haas 4

15. Daniil Kvyat (Russia) Toro Rosso 4

16. Marcus Ericsson (Sweden) Sauber 0

17. Lance Stroll (Canada) Williams 0

18. Fernando Alonso (Spain) McLaren 0

19. Antonio Giovinazzi (Italy) Sauber 0

20. Jolyon Palmer (Britain) Renault 0

21. Stoffel Vandoorne (Belgium) McLaren 0

CONSTRUCTOR STANDINGS

1. Mercedes 161

2. Ferrari 153

3. Red Bull – TAG Heuer 72

4. Force India – Mercedes 53

5. Toro Rosso – Renault 19

6. Williams-Mercedes 18

7. Renault 14

8. Haas – Ferrari 9

9. Sauber – Ferrari 6

10. McLaren 0