Budapest: Lewis Hamilton claimed his first pole position since 2021 after edging Max Verstappen in qualifying on Saturday for the Hungarian Grand Prix.
The seven-time world champion ended a barren run stretching back 33 races by claiming a record-increasing 104th pole of his career and his record ninth at the Hungaroring circuit.
His success with a last-gasp lap was greeted with cheers by the crowd and ended defending double world champion Verstappen's run of five straight poles for Red Bull.
"I didn't expect this, for us to be fighting for pole position here this weekend," said a hoarse and emotional Hamilton, who had described his car as being "at its worst" on Friday.
"But hats off to the team. They've done a fantastic job" added Hamilton, back on the front of the grid for the first time since the Saudi Arabian Grand Prix in 2021.
The Briton outpaced Verstappen by just 0.003 seconds in a thrilling conclusion to their contest.
Verstappen, whose Red Bull car ran with an updates package, was disappointed.
"We've not been on it so far this weekend,"he said, but with a 99-point lead ahead of team-mate Perez in the title race, he could afford a rare off day.
Lando Norris was third ahead of his McLaren team-mate Oscar Piastri, Alfa Romeo's Zhou Guanyu and Ferrari's Charles Leclerc with Valtteri Bottas taking seventh for Alfa Romeo.
Two-time champion Fernando Alonso was eighth for Aston Martin ahead of Red Bull's Sergio Perez, back in the top-ten shootout for the first time in six outings, and Nico Hulkenberg of Haas.