Daniel Ricciardo triumphed in a thrilling three-way fight for the Hungarian GP win, taking it ahead of Fernando Alonso and Lewis Hamilton.
Although it initially appeared as if Nico Rosberg would race away with the victory, Ricciardo found himself leading the way when the first Safety Car came out on lap 9.
Elevated to P1 when those ahead of him pitted, the Red Bull racer made the most of his strategy and a second Safety Car to emerge third after the final stops had played out.
With fresher tyres than those ahead, he quickly closed down Hamilton, taking second by going around the outside of Turn 2 and then inside at Turn 3.
A lap later he passed Alonso, using his superior speed to blast into the lead at Turn 1.
He took the chequered flag 5.2s ahead of Alonso. The Ferrari driver was given a bit of breathing room in his battle with Hamilton as on the final lap the Brit came under attack from his team-mate Rosberg.
The last to pit, Rosberg's tyres allowed him to close the gap at almost four seconds a lap. However, he got to the front a lap too late to reach the podium.
Felipe Massa was fifth for Williams ahead of Kimi Raikkonen, Sebastian Vettel and Valtteri Bottas.
There were two Safety Cars on the day as Marcus Ericsson crashed on lap 9 while Sergio Perez spewed debris all over the track when he slammed into the pitwall.
They were joined on the sidelines by Esteban Gutierrez, Kamui Kobayashi, Romain Grosjean and Nico Hulkenberg. It was Hulkenberg's first DNF of this season and in fact the first time he has failed to score.
01 Daniel Ricciardo Red Bull 1h53m05.058
02 Fernando Alonso Ferrari +5.2s
03 Lewis Hamilton Mercedes +5.8s
04 Nico Rosberg Mercedes +6.3s
05 Felipe Massa Williams +29.8s
06 Kimi Raikkonen Ferrari +31.4s
07 Sebastian Vettel Red Bull +40.9s
08 Valtteri Bottas Williams +41.3s
09 Jean-Eric Vergne Toro Rosso +58.5s
10 Jenson Button McLaren +1m07.2s
11 Adrian Sutil Sauber +1m08.1s
12 Kevin Magnussen McLaren +1m18.4s
13 Pastor Maldonado Lotus +1m24.0s
14 Daniil Kvyat Toro Rosso -1 lap
15 Jules Bianchi Marussia -1 lap
16 Max Chilton Marussia -1 lap
Did Not Finish
17 Esteban Gutierrez Sauber 33 laps
18 Kamui Kobayashi Caterham 25 laps
19 Sergio Perez Force India 23 laps
20 Nico Hulkenberg Force India 15 laps
21 Romain Grosjean Lotus 11 laps
22 Marcus Ericsson Caterham-Renault 8 laps