The Briton took his 97th career pole position with a strategic masterstroke, fuelling his car for an extra flying lap at the death when his Mercedes teammate, Valtteri Bottas, took enough fuel for only one.
Bottas was holding provisional pole when the pair left pit lane for the final runs of qualifying, but though the Finn successfully fended off Hamilton’s first attempt to wrest top spot from him, he was powerless to reply to the Briton’s second flying lap.
Hamilton duly scraped together a Bottas-beater, snatching pole by just 0.102 seconds.
“I can’t tell you how hard that was today,” Hamilton said. “Yes, we’ve got a great car, but you have to drive the nuts off of it to pull out a lap.”
After equalling Michael Schumacher’s 91-win record last race in Germany, Hamilton now has chance to set the record outright.
For Bottas qualifying second could prove doubly costly. The newly resurfaced track is slippery off the racing line, which will make executing a clean launch from second place more difficult than usual.
“I think for sure it would’ve been nice to be on the clean side, in P1,” he said. “But I’ll do whatever I can from P2.”
Max Verstappen qualified third for Red Bull Racing, but whereas both Mercedes drivers will start the race on the medium tyre, the Dutchman will use the soft, setting up a strategic duel on a circuit at which teams have very little working experience.
Formula One has never raced at Portimão, and teams lost a substantial amount of practice time to red flags.
“Again P3, not too far behind,” Verstappen said. “A lot to play for tomorrow and we hope we can stay close.”
Charles Leclerc will join Verstappen on the second row after a standout qualifying performance to drag his Ferrari to within half a second of pole.
The Monegasque’s efforts are reward for Ferrari’s recent string of upgrades to address the substantial flaws in the SF1000 that have left the team mired in the midfield for much of the season.
Racing Point’s Sergio Perez qualified fifth ahead of Red Bull Racing’s Alex Albon.
Thai driver Albon, who is racing for a contract extension at the race-winning team for 2021, was more than 0.75 seconds off the pace and more than 0.65 seconds slower than teammate Verstappen.
Carlos Sainz and Lando Norris qualified seventh and eighth for McLaren ahead of AlphaTauri’s Pierre Gasly.
Daniel Ricciardo completed the top 10 for Renault, albeit without setting a lap in Q3 after damage from a crash at the end of Q2 proved too substantial to repair in time to take part in the final shootout.
His teammate, Esteban Ocon, qualified 11th ahead of Lance Stroll, the Racing Point driver returning to the cockpit after missing the Eifel Grand Prix with COVID-19.
Daniil Kvyat will start 13th for AlphaTauri alongside Williams driver George Russell.
Sebastian Vettel qualified a lowly 15th for Ferrari, the German struggling to build temperature in his tyres after Ferrari sent him out on the slower medium compound rather than the grippier soft.
He was one of only four drivers to use the more durable tyre in Q2 - both Mercedes drivers and teammate Leclerc did likewise - but three others qualified in the top 10.
Alfa Romeo duo Kimi Raikkonen and Antonio Giovinazzi will line up 16th and 17th on the grid ahead of Haas drivers Romain Grosjean and Kevin Magnussen.
Nicholas Latifi will start last for Williams.