(CNN) -- Lewis Hamilton surrendered his Formula One drivers' championship lead to Mark Webber after failing to finish at the Hungarian Grand Prix.
The Australian's victory meant Red Bull also moved to the top of the team standings above McLaren, whose world champion Jenson Button finished eighth after starting 14th on the grid.
Webber moved 14 points clear of Hamilton, while teammate Sebastian Vettel moved up to third as he salvaged a podium place behind Fernando Alonso after a 25-second drive-through penalty ended the German polesitter's hopes of victory.
The top-five drivers are within 20 points of Webber with seven races left, with Fernando Alonso remaining fifth despite his second placing for Ferrari.
The Italian team trail Red Bull by 74 points after Felipe Massa finished fourth on his return to the Budapest circuit where a freak accident in qualifying last year ended his season.
Drivers' Championship (after 12 rounds):
1. Mark Webber (Aus) Red Bull 161 points
2. Lewis Hamilton (GB) McLaren 157
3. Sebastian Vettel (Ger) Red Bull 151
4. Jenson Button (GB) McLaren 147
5. Fernando Alonso (Spa) Ferrari 141
6. Felipe Massa (Bra) Ferrari 97
7. Nico Rosberg (Ger) Mercedes GP 94
8. Robert Kubica (Pol) Renault 89
9. Michael Schumacher (Ger) Mercedes 38
10. Adrian Sutil (Ger) Force India 35
1. Red Bull 312 points
2. McLaren 304
3. Ferrari 238
4. Mercedes GP 132
5. Renault 106
6. Force India 47
7. Williams 40
8. Sauber 23
9. Toro Rosso 10