Australia's Ricciardo wins Hungarian Grand Prix

Red Bull Formula One driver Daniel Ricciardo of Australia drives during the Hungarian F1 Grand Prix at the Hungaroring circuit, near Budapest.

Red Bull's Australian Daniel Ricciardo won a dramatic Hungarian Grand Prix while Lewis Hamilton stunned championship-leading Mercedes team mate Nico Rosberg with the drive of the day from pitlane to podium.

Ferrari's Fernando Alonso took a fighting second and Rosberg, who had started on pole position looking like a runaway winner, finished fourth and saw his 14 point lead over Hamilton trimmed to 11.

The German was caught out by two safety car interventions that turned the race on its head - and also by Hamilton refusing to give anything away despite being asked controversially to let him through.

With eight races to go, and double points for the last in Abu Dhabi, Rosberg has 202 points to Hamilton's 191. Mercedes have a 174-point lead over champions Red Bull in the constructors' standings.

Ricciardo, a revelation in his first year at Red Bull, bellowed in elation after he took the chequered flag 5.2 seconds ahead of Alonso for his second win of the season and his career.

"It feels as good as the first, it really does," beamed the Australian, who was triumphant in Canada in June, after a rollercoaster of a race packed with incident.

"The safety car at the beginning played to our advantage...when the second one came out it didn't really help us, but we managed to pull it off at the end."

All of the top four had led over the course of a race that started after a brief downpour, was interrupted by two big crashes, continued with the ever-present threat of rain and finished on a knife-edge.

Just 6.3 seconds separated the top four, with Hamilton crossing the line just half a second clear of Rosberg.