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.
Vettel had yesterday called on Red Bull "to raise their game" due to their dip in form in the last two races, and they did so to such an extent they broke the overnight curfew for the first time this season.
Teams are not allowed to work on cars between the hours of 2am-8am, although they have four exemptions in case of exceptional circumstances.
With Red Bull determined to keep their noses in front, with Vettel 77 points ahead of Webber in the drivers' standings, mechanics are understood to have made wholesale changes to the cars, finishing at 5am.
Expressing his gratitude, Vettel said: "It seems we did the right thing.
"Q1 and Q2 were about getting through to the last session, and we got the result.
"We changed a lot on the car overnight, the boys did not get a lot of sleep, so this is the best way of saying thanks.
"I've my confidence back in the car, so now I'm looking forward to tomorrow."
Hamilton, who was ecstatic at clinching a front-row start at last weekend's German Grand Prix, knew he had missed an opportunity on this occasion.
"It's still a great achievement for us," said the 26-year-old, a two-time winner at this track.
"We knew we had the pace, but today they (Red Bull) had good pace, but with Jenson behind me I'm happy we can get some good points from here.
"You can always look back and think you could have found some more speed.
"But I went wide on turn nine, and then at the last corner I lost whatever advantage I had, otherwise it would have been very close."
As for Button, he appeared the more content of the British duo as he said: "I'm pretty happy with that.
"Qualifying has been my issue of late, but this was a good lap, so I'm happy to be up there and fighting.
"Tomorrow is a big day for me, my 200th grands prix, and when you are that close to the front you have to go for the win."