Ferrari's Fernando Alonso has won the Spanish Grand Prix, having started the race in fifth place, while his Ferrari teammate Felipe Massa finished third.
Nico Rosberg started in pole position, with his Mercedes teammate Lewis Hamilton in second place.
However, Alonso passed Hamilton in the first lap to move up to fourth place. On the 13th lap, the Spaniard took the lead in his home country and Sebastian Vettel got the better of Nico Rosberg just moments later to take second, as both Mercedes drivers struggled with their tyres.
Alonso led from the front throughout the race, as the Spanish crowd cheered him home.
Kimi Raikkonen finished second ahead of Alonso's teammate Massa, with Vettel, Mark Webber, Nico Rosberg and Paul Di Resta completing the top seven.
The result leaves Ferrari in second place in the Constructors' Championship standings behind Red Bull.
Spanish Grand Prix results in full:
1. Fernando Alonso (Ferrari)
2. Kimi Raikkonen (Lotus)
3. Felipe Massa (Ferrari)
4. Sebastian Vettel (Red Bull)
5. Mark Webber (Red Bull)
6. Nico Rosberg (Mercedes)
7. Paul Di Resta (Force India)
8. Jenson Button (McLaren
9. Sergio Perez (McLaren)
10. Daniel Ricciardo (Toro Rosso)
11. Esteban Guttierez (Sauber
12. Lewis Hamilton (Mercedes
13. Adrian Sutil (Force India)
14. Pastor Maldonado (Williams)
15. Nico Hulkenberg (Sauber)
16. Valtteri Bottas (Williams)
17. Charles Pic (Caterham)
18. Jules Bianchi (Marussia)
19. Max Chilton (Marussia)
Not classified. Jean-Eric Vergne (Toro Rosso), Giedo van der Garde (Caterham), Romain Grosjean (Lotus)