Sebastian Vettel claimed Red Bull's 10th pole position of the year following an electrifying shootout with Ferrari's Fernando Alonso.
The Spaniard, quickest in the first two qualifying sessions, seemed poised to take Ferrari's first pole for 28 races, stretching back to the 2008 Brazilian Grand Prix.
But roared on by his home fans at Hockenheim, Vettel snatched top spot from double world champion Alonso by just two thousandths of a second on his final flying lap to spark joyous scenes amongst the German fans.
Vettel will almost certainly claim this to be the best pole of his six this season and 11 of his career.
Fortunately, there was none of the rain that blighted practice yesterday, as well as the start of this morning's final session.
It served up a stunning display, with Ferrari proving they are back with a bang given their recent problems as Felipe Massa will start third.
Mark Webber, winner last time out at Silverstone, is fourth on the grid, followed by the McLaren duo of Jenson Button and Lewis Hamilton, the former outpacing the latter for the first time in seven races.
Renault's Robert Kubica is seventh, followed by Rubens Barrichello and team-mate Nico Hulkenberg 10th as the Williams duo sandwich Mercedes' Nico Rosberg.
For the third time in four qualifying sessions, Michael Schumacher failed to make it out of Q2, with fellow German Hulkenberg proving to be his undoing on this occasion.
Towards the end of the 15 minutes Schumacher had crept into 10th position, only for Hulkenberg to knock the seven-times champion down to 11th with his final flying lap.
The 41-year-old missed out on a top-10 place by just 0.008secs to team-mate Rosberg, hardly what the team were hoping for on home turf.
Sauber's Kamui Kobayashi and Renault's Vitaly Petrov will line up 12th and 13th, and Adrian Sutil in his Force India qualifying 14th.
However, with the German requiring a gearbox change, he incurs a five-place grid penalty that means he will now start 19th.
Pedro de la Rosa in his Sauber will now start 14th, followed by the Toro Rosso pairing of Jaime Alguersuari and Sebastien Buemi.
It proved to be a wretched qualifying session for Force India as the initial 20-minute run was red flagged after five minutes due to Vitantonio Liuzzi hitting a wall along the start-finish straight.
Liuzzi made a mistake by running wide on the still wet astroturf on the outside of the final corner, known as the Sudkurve.
That sent the Italian careering across the track where he ended up ploughing into the concrete pit wall, immediately losing his front wing and a tyre that was narrowly avoided by a passing Ferrari.
With fibreglass from the chassis scattered across the circuit, it took the marshals eight minutes to clear away the debris and the pit lane to re-open again.
Liuzzi will start 22nd, with only Hispania Racing's Sakon Yamamoto and Lucas di Grassi for Virgin Racing behind him, the latter unable to set a time due to a technical problem.
The four drivers ahead of Liuzzi who all failed to make it out of Q1 were the Lotus duo of Jarno Trulli and Heikki Kovalainen, along with Timo Glock and Bruno Senna for Virgin and Hispania Racing.
Due to Sutil's penalty, Trulli and Kovalainen will move up to 17th and 18th on the grid, with Glock and Senna 20th and 21st.
Vettel, wearing a big beaming smile after his third pole in a row, said: "It would be interesting to see just how much it is, two thousandths of a second.
"It was very close all session. Fernando was really strong, and the Ferraris were very competitive.
"We knew it would be a difficult session, and two thousandths of a second is not what you are looking for, so we had to push very hard and it was very exciting.
"I'm extremely happy because it's my first time on pole at home, but the challenge will come tomorrow when it will be a tough fight against the red cars."
Alonso said: "We have to be happy because we are on the front row of the grid for the first time this season.
"Finally we have had a perfect Saturday, and although we lost pole by a very small margin, this is not important.
"The points are won tomorrow, so we also have to have a good Sunday.
"This is a massive step for Ferrari, with both of us in the top three, and this is the way we have to keep going."
Massa, back in the top three for the first time since the season- opening grand prix in Bahrain, said: "It was a good performance from us in what was a very tough qualifying.
"In Q3 I could have been better, but I'm happy to be back in the top three, so now we have to do a good job tomorrow."Reuse content