SHANGHAI -- McLaren driver Lewis Hamilton overcame a prerace mechanical drama to win a thrilling Chinese Grand Prix on Sunday, passing Red Bull's Sebastian Vettel for the lead with five laps remaining.
Vettel made a strong bid for three straight wins to start the Formula One season but he could not hold off Hamilton, who made one more pit stop than the German and had fresher tires at the end.
"It was one of the best races I have experienced," said Hamilton, whose last victory was last year's Belgian GP. "It feels amazing to be able to bring it home. I am absolutely overwhelmed. It feels like a long, long time [since winning]. I am so proud and extremely grateful."
Red Bull's Mark Webber, who started 18th, made a remarkable charge to the front to finish third.
Vettel, who has 12 victories in 65 career starts, was trying to become the first driver since Michael Schumacher in 2004 to start the season with three straight victories.
Hamilton came close to being out of contention before the race even started, when a fuel leak was discovered in his engine. McLaren mechanics worked frantically in the garage with the seconds ticking down until the pitlane closed. Had they missed the deadline, Hamilton would have started from pitlane rather than third on the grid.
They sent him out on the installation lap with only one minute to spare, but with much of the engine cover missing, and that had to be drilled onto the car while it was sitting on the grid.
"I had real confidence in the guys they would figure it out," Hamilton said. "As I was driving to the light I was nervous that just as I got to it, it would go red, but fortunately I got out."
Vettel started from pole but was passed by both McLarens before the first corner. He managed to get ahead of both in the first round of pit stops, overcoming an odd incident in which Button mistakenly pulled into the Red Bull garage right in front of him, and had to be waved on to the correct space.
Rosberg had already changed his tires by then and inherited the lead while the others pitted, but Vettel went ahead again after the second round of stops. Unlike McLaren, Red Bull then decided not to pit again and Vettel acknowledged after the race that the strategy of doing the final 25 laps on one set of tires "wasn't the best."
"The pace was there, but we decided to be patient and go with two stops, and when it doesn't work, it doesn't work," Vettel said. "I don't see second today as a disappointment."
Hamilton was fourth with 16 laps remaining and all pitstops completed. He passed Rosberg for third on lap 42, then got past Massa two laps later to move up to second, 4.6 seconds behind Vettel.
Hamilton, who now has 15 career wins, whittled the gap down over the next eight laps, eventually passing Vettel comfortably on turn seven with five laps remaining.
Meanwhile, Rosberg, Button and Massa were struggling on worn tires, and were swallowed up by Webber, who made an extraordinary charge through the field in the second half of the race.
The Australian was in 17th place with more than a quarter of the race gone, but having started on hard tires, he was able to use softer-compound ones throughout the latter half, passing Schumacher, Alonso, Massa and Rosberg in the final 15 laps.
"All of a sudden I just felt comfortable with the car," Webber said.
As for Schumacher, he won this race in 2006 for the last of his record 91 victories.
With three races completed, Vettel leads the drivers' standings with 68 points, ahead of Hamilton (47), Button (38) and Webber (37).
The next race will be the Turkish Grand Prix on May 8.