Lewis Hamilton took his first win for Mercedes by dominating the Hungarian Grand Prix.


Hamilton controlled the race as he beat Lotus's Kimi Raikkonen and Red Bull's Sebastian Vettel into second and third.


Red Bull's Mark Webber recovered from 10th on the grid to take fourth ahead of Ferrari's Fernando Alonso.


Raikkonen moves one point ahead of Alonso into second in the championship, 38 points adrift of Vettel, who is on course for a fourth title.


Alonso spent the last stint of the race holding off Lotus's Romain Grosjean, whose podium chances were wiped out by a penalty for overtaking off the track.


The Frenchman passed Ferrari's Felipe Massa around the outside of Turn Four on lap 29, but had all four wheels beyond the white line that demarcates the track limits and he was given a drive-through penalty.


Grosjean may yet be given a second punishment - the stewards are to investigate after the race a collision between him and McLaren's Jenson Button.


Grosjean appeared to edge Button off the track on the outside as he passed him into the chicane on lap 24.


At that stage, Grosjean was battling with Vettel for what was a de facto second place behind Hamilton, who was out of everyone else's reach.


Hamilton had said after taking pole position on Saturday that it would be a "miracle" if he won the race, considering the high temperatures in Hungary and the problems Mercedes have had with tyre wear in recent races.


But he was in control throughout, leading off pole position, lost the lead to Grosjean and then Webber after making his first pit stop and then regained it when the Australian made his first stop on lap 23, having started on a different tyre following problems in qualifying.


Hamilton made sure of victory with two impressive overtaking moves on Webber.


The Mercedes rejoined behind the Red Bull after both his second and third pit stops, and each time immediately passed him around the outside of Turn Two and into the fast Turn Three.


The moves took place shortly before the same spot that Nigel Mansell famously passed Ayrton Senna for victory in Hungary in 1989 and underlined Hamilton's superiority.


The 28-year-old has now won four times in Hungary out of his seven races here.


In an intriguing race, Vettel survived problems with a front wing broken when he touched Button trying to pass the McLaren in Turn Two shortly after the world champion's first pit stop.


At the time, Vettel was being urged to cool his car because his Kers power boost system was overheating.


As the race developed, it emerged Vettel was battling Raikkonen for second place.


The Finn had made up ground impressively on a two-stop strategy - when all the other leading drivers did three - after dropping to 10th following his first pit stop.


Vettel rejoined just over two seconds behind the Lotus after his own final pit stop with 15 laps to go, but with Raikkonen on far older tyres, on which he was asking to do 28 laps in his final stint.


The German was on Raikkonen's tail with 11 of the 70 laps to go, but the experienced Finn was able to hold him off.


Vettel made one attempt to pass Raikkonen around the outside of Turn Four on lap 68, but he defended and Vettel had to back off.


The reigning world champion complained Raikkonen had not given him enough room, and his team said they would talk to race director Charlie Whiting about the incident.


Webber recovered well from his 10th place on the grid to run second before his final stop, after which he dropped to fourth.


Alonso's Ferrari ran fourth in the early laps after starting fifth but did not have the pace to compete with the cars in front.


Alonso was lapping around a second slower than Vettel, despite the damage to the Red Bull, and he was forced to focus on holding off Grosjean to take fifth, exactly where the Spaniard finished in Hungary last year.


Button took seventh place, ahead of Ferrari's Felipe Massa, who drove the entire race with a damaged front wing after being hit by Nico Rosberg's Mercedes on the first lap.


Rosberg was on course for ninth before retiring in flames with five laps to go, promoting McLaren's Sergio Perez to ninth ahead of Pastor Maldonado, who scored Williams's first point of the season.