NUERBURGRING, Germany — Lewis Hamilton and his Mercedes earned the pole position for Sunday's German Grand Prix, edging Red Bull's three-time defending Formula One champion Sebastian Vettel.

Hamilton's second consecutive pole and third of the season made up for the disappointment of seeing the second Mercedes driver, Nico Rosberg, knocked down to 11th at the end of the second qualifying session.

Hamilton set the fastest qualifying time Saturday of 1 minute, 29.398 seconds. Vettel had dominated the last two practice sessions but ended up .103 seconds behind Hamilton, who gained his 29th career pole.

Marc Webber in the second Red Bull was third, with the Lotus pair of Kimi Raikkonen and Romain Grosjean next.

Daniel Ricciardo of Toro Rosso was sixth, Felipe Massa of Ferrari seventh and his teammate Fernando Alonso eighth.

Rosberg, who won two of the last three races, was sitting second midway through the second qualifying session and his team left him in the garage, apparently believing his time was good enough to put him into the top 10 for the third and decisive session.

But Raikkonen led a charge of late efforts and Rosberg watched from the garage as he was eliminated.

Mercedes came into the race having earned the pole in five of the previous six GPs but has struggled to sustain the challenge in actual racing conditions.

Many leading drivers had threatened to pull out of Sunday's race if tire blowouts that plagued last week's British GP persisted.

Supplier Pirelli made changes and the tires have held, reducing the risk of a pullout.

Vettel said he was confident that there would be no tire problems serious enough to force drivers to pull out for their safety.