The seven-time world champion - who was booed by orange-clad Dutch fans of Max Verstappen at the sweltering Hungaroring following the duo’s controversial collision at Silverstone a fortnight ago - led a Mercedes one-two in qualifying, with Silver Arrows team-mate Valtteri Bottas also on the front row, 0.315 seconds behind.
Hamilton’s title rival and championship leader Verstappen could only secure third place on the grid with his quickest lap 0.106secs slower than Bottas, one spot ahead of fellow Red Bull driver Sergio Perez.
Pierre Gasly was fifth for AlphaTauri, ahead of the McLaren of Lando Norris and Ferrari’s Charles Leclerc, with Alpine pair Esteban Ocon and Fernando Alonso and Aston Martin’s Sebastian Vettel rounding off the top 10.
Haas’ Mick Schumacher was unable to participate in qualifying after a crash suffered in the third practice session earlier on Saturday, after which he needed a new gearbox and took a five-place grid penalty.
“It was an amazing qualifying lap and it has been amazing teamwork from everyone, Valtteri included, trying to push the car forward,” Hamilton said afterwards.
“They guys at the factory have not left any stone unturned. I’ve never felt so great with the booing [from the fans], I don’t mind it.
“The soft tyre is worth something like five metres into turn one, it was surprising to see everyone in the top 10 on the softs apart from us.
“I hope the weather is good for everyone, enjoy the sun and stay safe.”
Verstappen said: “The whole weekend we’ve been a bit behind and it showed in qualifying. It’s not what we want but we’re still there in P3 and will see what we can do.
“It’s going to be really hot so a soft tyre will not last as long as the mediums but we should be good off the line.”