By Andrew Benson
BBC Sport at Silverstone
Britain's Lewis Hamilton set the stage for a dream victory in Sunday's British Grand Prix by taking pole position with the very last lap of qualifying.
Hamilton edged out Ferrari's Kimi Raikkonen by 0.102secs
The 22-year-old star produced a superb lap of one minute 19.997 seconds to delight the home crowd and edge out Ferrari's Kimi Raikkonen by 0.102secs.
Hamilton's team-mate Fernando Alonso, who was fastest in the first two parts of qualifying, is third on the grid.
Ferrari's Felipe Massa is fourth, but less than 0.3secs behind Hamilton.
The McLaren and Ferrari drivers appear closely matched and the race promises to be closely-fought and tense.
But Hamilton is in the perfect position to win his first home Grand Prix, take his third victory in four races and extend his already substantial 14-point lead in the world championship.
Hamilton was thrilled to be starting his home race from the front.
"It was an extremely tense qualifying session," he said. "Ferrari were extremely quick, and so was Fernando.
"It was all down to the final lap. I thought, coming up to the first corner, 'try to do it flat'. I didn't, but I nearly did.
"I gained a couple of tenths and I was able to maintain that through the first sector. It was very tense, but I was able to pull it together."
Hamilton was quick to pay tribute to his legion of fans and said he had got a "big buzz" and "a lot of energy" from their support.
"You definitely get a confidence boost," he said.
I lost all the traction, the sand was flying everywhere, it's a bit disappointing
"Usually there are pockets, but here it's the whole grandstand. I can't believe how many people are here today and it's been fantastic."
Raikkonen, who has looked very quick throughout the weekend, said he had lost pole with a mistake at the final corner, where he ran wide and put two wheels on the grass.
"I lost all the traction, the sand was flying everywhere, it's a bit disappointing," said the Finn, who won the French Grand Prix at Magny-Cours last weekend.
"But hopefully we can get a good start and it is a long race, so we'll see what we can do."
Alonso said he was confident of competing for victory after taking third on the grid.
"I am quite happy with the car," said the world champion.
"Obviously we would want to be on pole position but third is the best we could today and hopefully tomorrow it will pay off and we can overtake people in the race.
There's no reason why we cannot be competitive
McLaren's Fernando Alonso
"On Friday we tried to work a little bit with the set-up in terms of race pace to understand how the tyres perform in the long runs.
"I was not too happy with the car and our pace did not look too good, especially in the long runs.
"But overnight we did some changes and I found a completely different car. There's no reason why we cannot be competitive."
BMW Sauber's Robert Kubica took fifth place, ahead of the surprising Ralf Schumacher in sixth.
The German has struggled this season with his Toyota but has looked quick all weekend at Silverstone.
Rookie Heikki Kovalainen was the faster of the two Renaults in seventh place, just ahead of Giancarlo Fisichella.
Kubica's team-mate Nick Heidfeld and the second Toyota of Jarno Trulli completed the top 10.
Neither Red Bull made it past the second session, with Mark Webber and David Coulthard taking 11th and 12th places.
It has been a bad weekend for Honda. After being caught up in the F1 spy row, it got worse in qualifying when Jenson Button's factory car, and both the Super Aguris from their B team, were eliminated after the first session.
Button's team-mate Rubens Barrichello scraped through into the second session but could manage only 14th place.
1 L Hamilton (GB) McLaren-Mercedes 1min 19.997secs
2 K Raikkonen (Fin) Ferrari 1:20.099
3 F Alonso (Spn) McLaren-Mercedes 1:20.147
4 F Massa (Brz) Ferrari 1:20.265
5 R Kubica (Pol) BMW Sauber 1:20.401
6 R Schumacher (Ger) Toyota 1:20.516
7 H Kovalainen (Fin) Renault 1:20.721
8 G Fisichella (It) Renault 1:20.775
9 N Heidfeld (Ger) BMW Sauber 1:20.894
10 J Trulli (It) Toyota 1:21.240
11 M Webber (Aus) Red Bull-Renault 1:20.235
12 D Coulthard (GB) Red Bull-Renault 1:20.329
13 A Wurz (Aut) Williams-Toyota 1:20.350
14 R Barrichello (Brz) Honda 1:20.364
15 S Speed (US) Toro Rosso-Ferrari 1:20.515
16 V Liuzzi (It) Toro Rosso-Ferrari 1:20.823
17 N Rosberg (Ger) Williams-Toyota 1:21.219
18 J Button (GB) Honda 1:21.335
19 A Davidson (GB) Super Aguri-Honda 1:21.448
20 A Sutil (Ger) Spyker-Ferrari 1:22.019
21 T Sato (Jpn) Super Aguri-Honda 1:22.045
22 C Albers (Ned) Spyker-Ferrari 1:22.589