(CNN) -- Lewis Hamilton will start Sunday's Hungarian Grand Prix from pole position for the second successive season after a scintillating drive at a sizzling Hungagoring on Saturday.
The Mercedes driver, who took the checkered flag for McLaren in last year's race, was fastest in a time of one minute 19.388 seconds.
World championship leader Sebastian Vettel had to settle for second while Lotus' Romain Grosjean finished third with Hamilton's teammate Nico Rosberg completing the second row of the grid.
Hamilton, who finished just .038 seconds ahead of the Red Bull driver, paid tribute to his Mercedes team after qualifying.
"We brought some upgrades this weekend, the guys have been working incredibly hard to try and catch everyone. They are just doing a phenomenal job. It's a result of all the hard work they've put in."
Hamilton's efforts give him the best possible chance of claiming a fourth win at the track and equaling Michael Schumacher's record, but he admitted his task will be a tough one.
"(Being in pole) definitely helps. It's very difficult to follow here. It's a long way down to turn one but if you can get into turn one first and try and hold your position then it's definitely advantageous," he said.
"But looking after the tires in these conditions is going to be, as always, trouble. These guys (Red Bull and Lotus) are going to be ridiculously fast so trying to hold on to them is going to be the challenge tomorrow."
Temperatures at the track were hovering around 100 degrees Fahrenheit (37.7 degrees Celsius) on Saturday with weather forecasters predicting Sunday will be even hotter.
Vettel, who dominated Friday's practice and was leading until the dying seconds of qualifying, was full of praise for Hamilton.
"Mercedes have a very strong pace in qualifying and Lewis did an exceptional job today," Vettel said.
"I put a strong lap in. I had two sets of new tires and I was pretty happy with both laps. Maybe on the second try I was losing out a little bit in the middle sector -- it is very twisty -- maybe I wasn't aggressive enough there. At the end of the day, I was pretty happy with my lap but just not quick enough."
Teammate Mark Webber had a less happy time of it struggling to 10th place on the grid following a gearbox problem and an electrical failure that prevented his KERS from working.
Ferrari's Fernando Alonso will start Sunday's race from fifth place with Kimi Raikkonen a place further behind.
Alonso's teammate, Felipe Massa is seventh ahead of Daniel Ricciardo, who recorded an encouraging qualifying result for Toro Rosso.
McLaren, historically the most successful team at the Hungaroring with 11 wins, endured another frustrating day.
Jenson Button and Sergio Perez have amassed just 49 points between them this season and don't look likely to increase their tally substantially here. Perez finished qualifying in ninth, while Button failed to make it out of the second qualifying session and will start Sunday's race from 13th on the grid.
Sebastian Vettel currently leads the world championship by 34 points from Fernando Alonso with Kimi Raikkonen in third, 41 points adrift.