Mark Webber won the Hungarian GP in his Red Bull to take the world championship lead after Sebastian Vettel’s chances of a dominant victory were ruined by a drive-through penalty.
Ferrari's Fernando Alonso finished second with Vettel completing the podium in third place.
Vettel led comfortably from Alonso until a safety car period to remove debris from the circuit shook up the order.
Webber was the only front runner not to pit under the safety car and took the lead of the race. The Australian then eased clear from second placed Alonso and built up a sufficient lead to be able to take his pitstop and still emerge in front of the Spaniard.
Vettel’s challenge ended when he was given a drive-through penalty for not keeping within 10 car lengths of Webber under the safety car. Vettel finished third and has now failed to win on six of the seven occasions he has started on pole this season.
Hamilton lost the championship lead after retiring and his McLaren teammate Jenson Button had a tough weekend, finishing in eighth place.
There were two incidents in the pit lane during the safety car period: the right-rear wheel detached from Nico Rosberg’s Mercedes before bouncing down the pitlane and Robert Kubica’s Renault collided with Adrian Sutil’s Force India.
Late in the race, Michael Schumacher nearly pushed Rubens Barichello into the pit wall as the Brazilian tried to overtake. The German has been given a 10-place grid penalty for the next round at Spa-Francorchamps in Belgium on 29 July.
Just 20 points now cover the top five drivers in the championship.
Provisional Race Results
The Hungaroring, Hungary; 70 laps; 306.663km;
1. Webber Red Bull-Renault 1h41:05.5712. Alonso Ferrari +17.8213. Vettel Red Bull-Renault +19.2524. Massa Ferrari +27.4745. Petrov Renault +1:13.1006. Hulkenberg Williams-Cosworth +1:16.7007. De la Rosa Sauber-Ferrari +1 lap8. Button McLaren-Mercedes +1 lap9. Kobayashi Sauber-Ferrari +1 lap10. Barrichello Williams-Cosworth +1 lap11. Schumacher Mercedes +1 lap12. Buemi Toro Rosso-Ferrari +1 lap13. Liuzzi Force India-Mercedes +1 lap14. Kovalainen Lotus-Cosworth +3 laps15. Trulli Lotus-Cosworth +3 laps16. Glock Virgin-Cosworth +3 laps17. Senna HRT-Cosworth +3 laps18. Di Grassi Virgin-Cosworth +4 laps19. Yamamoto HRT-Cosworth +4 laps
Fastest lap: Vettel, 1:22.362