Sebastian Vettel returned to top spot on the grid at the end of one of the most hotly contested qualifying sessions of the season.
Lewis Hamilton led the way after the first run in the top-10 shoot-out for tomorrow's Hungarian Grand Prix, only to be deposed by the reigning world champion in his second outing at the Hungaroring.
The pole is Vettel's 23rd of his career, and eighth in 11 grands prix this season, but his first for three races following a lean run by his own high standards.
Hamilton, who endured a poor middle sector in his second run at the 2.722-mile circuit, missed out by 0.163secs to Vettel who posted a lap of one minute 19.815secs for his second successive pole at this track.
Hamilton's McLaren team-mate Jenson Button starts third in what will be his 200th grands prix, his best grid slot for five races as the Woking-based team proved they can again compete with Red Bull over one lap.
Remarkably, and for the first time this season, Felipe Massa out-qualified Ferrari team-mate Fernando Alonso, with Red Bull's Mark Webber a surprisingly lowly sixth after starting on pole at the last two races.
Behind the three leading teams, Mercedes' Nico Rosberg is seventh for his 100th race, with Force India's Adrian Sutil eighth, followed by seven-times champion Michael Schumacher in his Mercedes in ninth.
Sauber's Sergio Perez made the top-10 for only the second time this season, at least completing the session after crashing out of the one in Monaco when he sustained concussion and missed two races.
Paul di Resta, who throughout practice appeared poised for a top-10 spot, will start a disappointing 11th in his Force India, finishing a quarter of a second behind team-mate Sutil and a tenth off Perez.
Di Resta said: "My lap in Q2 wasn't quite there and maybe I could have been more adventurous.
"But it's a reasonable position to be in, and we're also on the clean side of the grid."
Behind the Scot will be Renault's Vitaly Petrov and Nick Heidfeld, the duo sandwiching the second Sauber of Kamui Kobayashi in 13th.
The Williams pair of Rubens Barrichello and Pastor Maldonado start 15th and 17th, forming another sandwich with Jaime Alguersuari in his Toro Rosso in between the Grove marque boys in 16th.
Toro Rosso's Sebastien Buemi led the list of names dropping out at the end of the initial 20-minute session.
Although qualifying 18th, the Swiss driver will drop five places to 23rd due to a penalty incurred after last week's German Grand Prix when he was found guilty of causing a collision with Heidfeld, a decision by the stewards he has described as "hard".
It means Lotus' Heikki Kovalainen, the Finn just three tenths of a second behind Buemi, and Jarno Trulli move up a place each to 18th and 19th, with Virgin's Timo Glock 20th.
Hispania duo Vitantonio Liuzzi and Daniel Ricciardo also climb a spot to 21st and 22nd respectively, with Virgin's Jerome D'Ambrosio the only driver behind Buemi come tomorrow's start.