Updated

Mercedes driver Lewis Hamilton clinched the pole position on his final lap at the British Grand Prix on Saturday, ahead of teammate Nico Rosberg and three-time defending champion Sebastian Vettel.

The 2008 champion won his 28th pole with a lap time of 1:29.607, just moments after the 28-year-old Rosberg had clocked the fastest time. Third-placed Vettel edged out his teammate Mark Webber, who is taking the track this weekend for the first time since announcing he was leaving the sport at the end of the year.

As Hamilton crossed the line, his team said over the radio "Storming job, Lewis, storming job" and fans in stands draped with a Hamilton banner were on their feet cheering. The 28-year-old Briton has only won the race once — in 2008.

"We made the right steps going into qualifying. Still not perfect but it helped," said Hamilton, who had criticized his car's performance before qualifying. "The crowd made a huge difference. I come here with an extra boost of energy. I just want to pay them back. This is the first time since 2008 that I've had a car that can compete."

Rosberg, who was fastest in practice and had been strong in recent weeks winning Monaco and pole in Spain, said he relished the rivalry with former karting rival Hamilton.

"It's a big battle we have. Usually it's close, not today," Rosberg said. "Lewis had a great lap in the end. It's a really big push for the team that we are pushing each other all the time. It's fantastic momentum we have at the moment."

Vettel said he was still optimistic he could win on Sunday. He has already done it once this year, overtaking Rosberg who was on pole to win the Bahrain GP and exposing the fact that Mercedes seems to be quickest in qualifying but often can't keep the same pace over an entire race.

"They are bloody quick in qualifying. They seem to be in a different world on Saturday afternoon," Vettel said. "They manage tires pretty well which allows them to get a good lap."

With 12 races remaining, Vettel has a 36-point lead over Ferrari's Fernando Alonso. Lotus driver Raikkonen is another eight points back in third and Hamilton is fourth.

The surprises of qualifying were Paul di Resta of Force India, who finished a career-best fifth, and Toro Rosso's Daniel Ricciardo, who starts sixth. The strong showing could help the Australian Ricciardo in his bid to replace Webber at Red Bull. The team said Friday it is looking at Kimi Raikkonen and Ricciardo and the other Toro Rosso driver Jean-Eric Vergne as a replacement. Vettel came from Toro Rosso, which is also owned by Red Bull.

While Hamilton had a good day, the rest of his rivals struggled. Raikkonen will start ninth and Alonso 10th — his worst place on the grid this year.

It was a disappointing qualifying for home favorite Jenson Button of Mercedes who just missed out on Q3 by 0.05 seconds and will start 11th while Ferrari's Felipe Massa, who crashed in practice on Friday, settled for 12th.