Updated

Fernando Alonso from Ferrari scored a hugely-popular victory in front of his home crowd by putting on a dominating performance in Sunday's Spanish Grand Prix.

Alonso started fifth but quickly charged through field before overtaking Mercedes driver and pole sitter Nico Rosberg for the lead on lap 13. The Spaniard then took command from there, finishing 9.3 seconds ahead of his closest competitor, Kimi Raikkonen from Lotus. Alonso claimed his second win of the season and the 32nd of his Formula One career, which moved him ahead of Nigel Mansell for fourth on the racing circuit's all-time grand prix winners list.

Michael Schumacher holds the record for most victories with 91, followed by Alain Prost's 51 wins and 41 victories for Ayrton Senna.

As part of his celebration, Alonso was handed the Spanish flag right after he took the checkered flag. He then waved the flag in salute to his fans while he made his cool-down lap around the 2.892-mile Catalunya circuit in Barcelona. Alonso also won the Spanish GP in 2006 when he drove for Renault.

"It's very special winning at home," Alonso said. "It doesn't matter how many times you can do it, how many times you repeat it, it's always like starting from zero and you have again very emotional last laps, very long last laps, because you want to finish obviously as soon as possible."

Alonso joined Raikkonen as the only active drivers who have multiple victories in the Spanish GP.

"I'm here only to do as good as we can, and always you want to win, and it's disappointing to finish second, but sometimes we have to take what we can get," Raikkonen said.

Felipe Massa shared the podium with his teammate, Alonso, and Raikkonen with his third-place run. Massa had to start ninth after he was handed a three- place grid penalty for impeding the progress of Red Bull's Mark Webber during qualifying.

"I was a little bit disappointed (Saturday) after the qualifying, losing three places, but the race was very good for us, our car was fantastic," Massa said.

Sebastian Vettel from Red Bull finished fourth, while Webber took the fifth spot. Rosberg ended up placing sixth.

"I think we can be happy with fourth today," Vettel said. "The first three cars were a little bit too fast for us, and in regards to looking after their tires, they did a better job."

Tire degradation was an issue throughout the 66-lap race, as almost all drivers, including Alonso, ran on a four pit-stop strategy.

Force India's Paul di Resta finished seventh, while McLaren drivers Jenson Button and Sergio were eighth and ninth, respectively. Daniel Ricciardo from Toro Rosso completed the top-10.

Vettel, the three-time defending F1 world champion, had his lead trimmed to four points over Raikkonen, while Alonso moved to within 17 points of the lead. Alonso trailed Vettel by 30 heading into the Spanish GP.

"We know that we have a car to fight with the top, and if we do well, we can fight for the championship," said Alonso, who also won the April 14 Chinese Grand Prix.

Lewis Hamilton from Mercedes is 39 points behind after finishing 12th. Hamilton started second but dealt with an ill-handling car during the event.