By Alan Baldwin
BUDAPEST (Reuters) - Britain's Lewis Hamilton seized his first win for Mercedes in the Hungarian heat on Sunday while Red Bull's Sebastian Vettel forged 38 points clear in the Formula One championship after finishing third.
"This is probably one of the most important grand prix wins of my career," Hamilton told the crowd after his fourth win at the Hungaroring circuit in seven years but his first with a team other than McLaren.
"I could not be happier. I hope there is plenty more to come. We have to work hard but if we can make the tires last here we can do it anywhere."
Kimi Raikkonen, who could be Vettel's team mate next season, took second place for Lotus - 10.9 seconds behind Hamilton - after doing one stop fewer and holding off the German in the tense closing laps to the delight of thousands of Finns in the crowd.
"I told Kimi I was not happy but he was laughing. That's racing," Vettel, who had complained over the radio after one failed attempt to pass that Raikkonen had not given him enough room, said with a smile.
Hungary marked the midpoint in the season and after 10 of the 19 races Vettel goes into the August break with 172 points to Raikkonen's 134.
Ferrari's Fernando Alonso lost ground and now has 133 after finishing fifth. Hamilton is on 124.
Hamilton, the 2008 world champion who won in Hungary for McLaren last season, led from pole position on a day when track temperatures reached 50 degrees Celsius to secure the 22nd win of his career.
"I was hungry for it today, I was going all out," said the Briton, who joins now-retired predecessor Michael Schumacher as the only drivers to have won four times in Hungary.
"Usually I get stuck in traffic and today I was going for every move I could."
The Briton had started on pole for the third race in a row and made a good start while team mate Nico Rosberg, who retired with flames shooting out of the rear of his car four laps from the end, plunged from fourth to 12th after one lap.
There were two occasions when Hamilton could have become stuck behind Vettel's team mate Mark Webber after pitstops but he dealt with the situation aggressively to make sure of Mercedes's third win of the season.
Vettel had slotted in behind Hamilton in second place at the start with Raikkonen's team mate Romain Grosjean third and Alonso muscling up to fourth.
Grosjean's forceful treatment of Ferrari's Felipe Massa, running off track to keep position, left him with a drive-through penalty and the Frenchman ended the race under investigation after another incident with McLaren's Jenson Button.
Vettel then lost time behind Button after a pitstop while Hamilton pulled away at the front and was able to control the race and manage the new Pirelli tires that had been his biggest concern before the start.
The tires were changed after a spate of blowouts at last month's British Grand Prix, one of which cost Hamilton a likely victory from pole, threw the sport into crisis.
Australian Webber, who had started on the harder tire, finished fourth for Red Bull, after starting 10th, while Grosjean ended up sixth.
Button, twice a winner in Hungary, was seventh while Massa took eighth ahead of McLaren's Mexican Sergio Perez.
Venezuelan Pastor Maldonado handed former champions Williams their long-awaited first point of the season - and first for 11 races - with 10th place after Rosberg had pulled off.
(Editing by Clare Fallon)