Hamilton’s win increased his points total to 192, six more than Rosberg as Ricciardo moved up to third.
Defending champion Lewis Hamilton produced a trademark triumph of pace and panache to win Sunday's Hungarian Grand Prix ahead of his Mercedes team-mate Nico Rosberg and replace him as leader of this year's world title race.
Hamilton outpaced Rosberg at the start and then controlled the 70 laps with a mixture of speed and flawless judgement in sweltering heat at the Hungaroring circuit.
His victory completed a hat-trick of successes in consecutive races, was his outright record fifth in Hungary, his fifth of the season and the 48th of his career.
Rosberg, who started from pole position, came home second ahead of Daniel Ricciardo of Red Bull, four-time champion Sebastian Vettel of Ferrari and Dutch teenager Max Verstappen in the second Red Bull.
Kimi Raikkonen was sixth in the second Ferrari ahead of two-time champion Fernando Alonso of McLaren and Carlos Sainz of Toro Rosso, Valtteri Bottas of Williams and Nico Hulkenberg who was 10th for Force India.
Hamilton's win increased his points total to 192, six more than Rosberg as Ricciardo moved up to third.
"Awesome race Lewis, mega result," said his Mercedes engineer on team radio. "Well done mate. Fantastic drive."
Hamilton responded generously. "As always, thank you guys, so much, for your hard work all weekend. This is a great result for the team," he said.