Updated

Fernando Alonso from Ferrari ended a 12- race winless streak in Formula One by taking Sunday's Chinese Grand Prix.

Alonso overtook pole sitter Lewis Hamilton for the lead in the early going of the 56-lap race at Shanghai International Circuit. The Spaniard dominated from there, relinquishing the top spot only when he made his pit stops. After his third and final stop, Alonso passed Sebastian Vettel for the lead with 13 laps to go and then went on to finish 10.1 seconds ahead of Kimi Raikkonen for the win.

Alonso, the 2005 and '06 F1 world champion, claimed his 31st career victory but his first since last July in the German Grand Prix. Three weeks ago, he retired in the Malaysian Grand Prix after damaging his front wing when he made contact with Vettel on the opening lap. Alonso finished the 2012 season just three points behind Vettel, who captured his third consecutive title.

"It was a fantastic race for us from the start to the end," Alonso said. "We did not have any big problems with the car, and the tire degradation was better than expected. So we managed to have good pace. It feels great after the retirement in Malaysia. We had some pressure to finish this race. In the two races we've finished this year, we got second place (Australian Grand Prix) and a victory. The start of the 2013 season for us is looking good. We are very optimistic."

Alonso's 31 wins moved into a tie with Nigel Mansell for fourth on the F1 all- time race 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.

Raikkonen started second but had a sluggish start in the opening laps. The Lotus driver then made contact with McLaren's Sergio Perez on lap 16. Raikkonen sustained damage to his front wing but rebounded nicely with a second-place run. He won the season-opener last month in Melbourne, Australia.

"I think in the end it was an okay result," Raikkonen said. "Obviously, we wanted to win. But after a bad start, the car was handling well. When I was overtaking Perez, I was next to him, and he just pushed me onto the curb. I tried to avoid him, but when I was on the grass, I hit him in the rear. It damaged the front, and that didn't help. Luckily, it didn't affect the handling, just a little bit of under-steering."

Hamilton and Vettel had a fierce battle for third on the final lap. Vettel, who made his last pit stop with just four laps to go, quickly gained on Hamilton and attempted to pass him with a few turns remaining on the last circuit. Hamilton's Mercedes crossed the line only 0.2 seconds ahead of Vettel's Red Bull.

"I'm really happy with today's result," Hamilton said after his third-place run. "It was a great result for the team. I'm very happy with the points. The team did a fantastic job all weekend, but unfortunately, we didn't have quite the pace (Alonso and Raikkonen) had. I'm still very fortunate to get on the podium."

Vettel, who started ninth, opted for soft tires on his last stop.

"We had speed with the fresh tires, and with a couple of more corners, we could have tried something, but it didn't quite happen," said fourth-place finisher Vettel. "That's just the way it goes sometimes."

Jenson Button from McLaren finished fifth, followed by Alonso's teammate, Felipe Massa, and Toro Rosso's Daniel Ricciardo. Paul di Resta from Force India, Lotus' Romain Grosjean and Sauber's Nico Hulkenberg completed the top-10.

Mark Webber from Red Bull retired early when his right-rear wheel came off a few laps after he and Toro Rosso's Jean-Eric Vergne made contact. Webber already had a frustrating weekend in China, as he had to start from the rear of the field, in pit lane, due to a penalty in Saturday's qualifying. A refueling problem in Q2 was to blame for Webber not having enough gas in his car for the mandatory one-liter sample when qualifying had concluded.

After the third grand prix this season, Vettel remained atop the championship standings, but there is just a 12-point separation between he and fourth-place Hamilton. Raikkonen is three points behind Vettel, while Alonso now trails by nine.