"It is unique and special. The stands were full of color and Spanish flags and, after the footballers won at Euro 2012, I am feeling very proud to be Spanish at the moment. This is possibly the best victory I have ever had."

But coming from 11th on the grid, Alonso needed a touch of good fortune to complete his remarkable victory ahead of Kimi Raikkonen in a Lotus.

With Vettel's retirement, Romain Grosjean of France in his Lotus looked primed for his maiden victory, but he too suffered a sudden engine failure, both alternator problems according to pit lane sources.

There was bitter disappointment as well for McLaren's Hamilton, who was in third on the penultimate lap when he crashed out in controversial fashion as he tried to hold off Pastor Maldonado in the Williams.

Hamilton, who had scored in all previous rounds of the championship, flung his steering wheel away in frustration before marching back to the pits.

Venezuela's Maldonado slipped back to 10th after the collision, leaving Michael Schumacher to come through for his first podium finish since returning to F1 in 2010 with Mercedes.

"I asked my guys at the end of the race where I finished and when they told me third, I couldn't believe it. You lose count of where you are, it was busy at the end of the race," he said.

Maldonado was later penalized 20 seconds by race stewards, dropping him back to 12th, with temmate Bruno Senna taking 10th for Williams.

Force India pair Nico Hulkenberg and Paul di Resta took a fine fifth and seventh, sandwiching Nico Rosberg in the second Mercedes.

Jenson Button was eighth for McLaren, Sergio Perez in ninth for Sauber.

Alonso leads the title race on 111 points from Red Bull's Mark Webber in second on 91 after his fourth place finish in Spain. Hamilton has 88 with Vettel four points behind in fourth place.