Highlights - German GP qualifying
German Grand Prix, 23-25 July, Hockenheim
Coverage: Live on BBC One, Red Button, BBC Sport website and Radio 5 live
Full details of practice, qualifying and Sunday's race
Red Bull's Sebastian Vettel will start on pole position at his home Grand Prix in Germany after he edged out Ferrari's Fernando Alonso by 0.002 seconds.
Vettel and Alonso will line up at the front of the grid at Hockenheim after the pair were almost inseparable in practice and qualifying.
Ferrari's Felipe Massa was third with the Red Bull of Mark Webber fourth.
The McLarens of Jenson Button and Lewis Hamilton will make up the third row of the grid, with Button in fifth place.
Ferrari have only picked up 19 points in the last three races but Alonso's performances in qualifying and practice have suggested he could be the man in the ascendency.
Alonso is 47 points behind championship leader Hamilton in the drivers' standings but Sunday's race will be the first time this season he has started on the front row of the grid.
And after losing out to Vettel by what equates to 15 centimetres the Spaniard admitted he was surprised to have been so close to taking the top spot ahead of the Red Bulls.
"We have to be happy, we are in the first row for the first time, that's a step forward for us," said Alonso.
"We expected the Red Bulls to give something more in Q3 as we have seen them do before.
"We are in a way surprised to be that close and finally fighting for pole position after 10 races, it took a little bit of a long time but now we are very close."
Top three drivers - German Grand Prix qualifying
For Vettel the German Grand Prix will be the the sixth time in 11 races he has started on pole and the German, who is 24 points behind Hamilton with nine races to go, admitted this pole position had been hard work.
"It was very, very close," said Vettel.
"All session Fernando was very strong and in general the Ferraris are very competitive here.
"We had to push very hard, it was extremely exciting and in the end it was enough by nearly nothing.
"I think we have a good car but it will be a tough fight against the red cars on Sunday I guess."
As the rain held off at Hockenheim, the Red Bulls and Ferrari dominated the fastest laps leaving world champion Button and team-mate Hamilton struggling 0.634 seconds behind the front two, something that troubled both McLaren drivers.
Hamilton said: "We need to do some work to improve the car.
McLaren now the the third-fastest team - Hamilton
"It was not the best session for me. The last lap wasn't that special. I was a tenth down at Turn One, and then I was up again and then I lost it again."
Meanwhile, Mercedes' Michael Schumacher, who had targeted a top six place on the grid, was shunted out of the top ten shoot-out and will start in 11th after fellow German Nico Hulkenberg of Williams pipped him by 0.1 secs on his final lap in Q2.
A frustrated Schumacher admitted: "It's a little disappointing because we were expecting to be fifth and sixth not ninth and 10th and it is not too optimistic for tomorrow even though we are stronger on race pace.
"So the hope of getting a podium for our fans here is not looking too good."
Hulkenburg will start from 10th on the grid on Sunday with his Williams team-mate Rubens Barrichello in eighth, sandwiching the Mercedes of Nico Rosberg who was the second quickest German of the six in the field.
Qualifying 'not good enough' for Webber
Robert Kubica again impressed in his Renault, qualifying in seventh place with his team-mate Vitaly Petrov in 13th position.
The first qualifying session was stopped early on when Force India's Vitantonio Liuzzi smashed into the wall at Turn 17, losing control after running wide on the last corner and touching the artificial grass.
"I came out of the last corner quite fast, and I think I hit a puddle in the artificial grass that was quite invisible," said the Italian.
Liuzzi's German team mate Adrian Sutil, who had suffered a driveshaft failure in final practice, qualified 14th but will be demoted five places on the starting grid for an unscheduled gearbox change.
Along with Liuzzi it was the six drivers from the new teams Lotus, Hispania and Virgin who bowed out after Q1 with Lotus' Jarno Trulli the quickest of them.
Sebastian Vettel's Hockenheim pole lap