Sebastian Vettel maintained Red Bull's 100 per cent pole position record this year as he stormed to the head of the Hungarian Grand Prix grid with a flying late effort in qualifying.
The world champion had been trailing behind Lewis Hamilton as he began his second and final effort at the end of Q3, but saved his best until last as he lapped the Hungaroring in 1m19.815s, just 0.163 seconds ahead of the McLaren driver.
Jenson Button made it two McLarens inside the front three while a superb late effort by Felipe Massa gave him fourth spot, demoting his Ferrari team-mate Fernando Alonso to fifth and the Red Bull of last year's race winner Mark Webber to sixth.
Adrian Sutil was a superb eighth for Force India, splitting Mercedes drivers Nico Rosberg and Michael Schumacher as the trio - unlike the top six - only undertook a single flying lap in Q3. Sergio Perez, who will start 10th for Sauber, did not bother going out at all.
There was a gap of almost two seconds from first to 10th with a couple of minutes of Q2 remaining, the result of which was that the top seven at that moment - led by Button - did not undertake second runs.
All of those drivers had done enough to make it into Q3, but behind them the order was constantly changing. Late flyers for Sutil and Schumacher brought the Force India and Mercedes drivers into the top 10 after the chequered flag had come out.
The big loser was Sutil's team-mate Paul di Resta, who was bumped back to 11th. The Renaults of Vitaly Petrov and Nick Heidfeld were 12th and 14th, split by Kamui Kobayashi's Sauber, while Rubens Barrichello and Jaime Alguersuari were next up for Williams and Toro Rosso.
Barrichello's team-mate Pastor Maldonado did not venture out in Q2, after the Venezuelan pulled himself into the session at the very end of Q1 with a flying lap. The Williams driver knocked Sebastien Buemi's Toro Rosso out of the reckoning.
The star of Q1 was Heikki Kovalainen, who put his Lotus 19th and just over 0.3s behind Buemi.
Behind him were his team-mate Jarno Trulli, Virgin's Timo Glock and Hispania drivers Vitantonio Liuzzi and Daniel Ricciardo, all of whom will move ahead of Buemi once his five-place grid penalty for colliding with Heidfeld in Germany last weekend is applied.
Pos Driver Team Time Gap
1. Sebastian Vettel Red Bull-Renault 1m19.815s
2. Lewis Hamilton McLaren-Mercedes 1m19.978s + 0.163
3. Jenson Button McLaren-Mercedes 1m20.024s + 0.209
4. Felipe Massa Ferrari 1m20.350s + 0.535
5. Fernando Alonso Ferrari 1m20.365s + 0.550
6. Mark Webber Red Bull-Renault 1m20.474s + 0.659
7. Nico Rosberg Mercedes 1m21.098s + 1.283
8. Adrian Sutil Force India-Mercedes 1m21.445s + 1.630
9. Michael Schumacher Mercedes 1m21.907s + 2.092
10. Sergio Perez Sauber-Ferrari No time
Q2 cut-off time: 1m23.067s Gap **
11. Paul di Resta Force India-Mercedes 1m22.256s + 1.994
12. Vitaly Petrov Renault 1m22.284s + 2.022
13. Kamui Kobayashi Sauber-Ferrari 1m22.435s + 2.173
14. Nick Heidfeld Renault 1m22.470s + 2.208
15. Rubens Barrichello Williams-Cosworth 1m22.684s + 2.422
16. Jaime Alguersuari Toro Rosso-Ferrari 1m22.979s + 2.717
17. Pastor Maldonado Williams-Cosworth No time
Q1 cut-off time: 1m23.285s Gap *
18. Sebastien Buemi Toro Rosso-Ferrari 1m24.070s + 2.492
19. Heikki Kovalainen Lotus-Renault 1m24.362s + 2.784
20. Jarno Trulli Lotus-Renault 1m24.534s + 2.956
21. Timo Glock Virgin-Cosworth 1m26.294s + 4.716
22. Tonio Liuzzi HRT-Cosworth 1m26.323s + 4.745
23. Daniel Ricciardo HRT-Cosworth 1m26.479s + 4.901
24. Jerome D'Ambrosio Virgin-Cosworth 1m26.510s + 4.932
107% time: 1m27.288s
* Gap to quickest in Q1
** Gap to quickest in Q2