A masterful Lewis Hamilton won the Hungarian Grand Prix in dominant style and for a record eighth time on Sunday to wrest the Formula One championship lead from Mercedes teammate Valtteri Bottas.

Max Verstappen took second for Red Bull, the Dutch youngster awarded 'drive of the day' after crashing on the way to the grid in early drama that had his mechanics scrambling to fix the damage before the start.

Bottas, now five points behind Hamilton after three races, finished a close third after battling back from a botched start off the front row.

Hamilton's 86th career victory, from his 90th pole position and collecting a bonus point at the end for fastest lap, left the six-time world champion five short of Michael Schumacher's all-time record of 91 wins.

The Briton also equalled Schumacher's record of winning a Grand Prix eight times, something the Ferrari great achieved in France between 1994 and 2006.

"Round one had multiple different punches that I wasn't perhaps ready for but I refocused and the last two have been fantastic," Hamilton, fourth in the opener won by Bottas, said of the season so far.

"This weekend, we've just been on point throughout so we need to try and keep this up."

Hamilton, winner of the Styrian Grand Prix in Austria the weekend before, now has two victories for the season and three in a row in Hungary, with the next two races on home soil at Silverstone.

Verstappen was amazed by his mechanics' performance in winning their own race against the clock, giving him a car to drive from seventh place on the grid and zero to hero.

Lewis Hamilton
Mercedes' Lewis Hamilton puts on a Black Lives Matter T-shirt before the race. Reuters

"I thought I was not going to race, so to be second is like a victory for me," he said.

Canadian Lance Stroll finished fourth for Racing Point with Alex Albon fifth for Red Bull in another turn up for the team that appeared to be struggling on Saturday.

Ferrari's Sebastian Vettel was sixth, with Racing Point's Sergio Perez seventh and Australian Daniel Ricciardo eighth for Renault.

Denmark's Kevin Magnussen opened his Haas team's account for the season with ninth place and Carlos Sainz secured the final point for McLaren.

AlphaTauri's French driver Pierre Gasly was the only retirement of the race.