Lewis Hamilton's wretched run in qualifying continued at the German Grand Prix as a brake failure sent the Formula One title contender crashing out in the opening session at Hockenheim.

And he was made to watch on as team-mate and title-rival Nico Rosberg then stormed to pole in his home Grand Prix.

Working his way through the stadium complex, and poised to set the quickest time with just over seven minutes remaining of Q1, Hamilton was suddenly sent pirouetting off track and into a tyre barrier.

Replays showed a puff of black smoke shoot out from the front-right brake on Hamilton's Mercedes on his approach into a left-handed loop.

After taking a few moments to compose himself before emerging from the cockpit of his wrecked car, Hamilton said over the team radio: "I put my foot on the pedal and something failed."

Hamilton eventually clambered from the cockpit of his car, raising his right hand to acknowledge he was okay.

Race director Charlie Whiting immediately red-flagged the session, with Hamilton's time from his initial hot lap at least good enough to keep him out of the bottom six at the end of Q1.

With Rosberg on pole by two-tenths of a second from his nearest rival on this occasion in Williams' Valtteri Bottas, Hamilton faces another exercise in damage limitation on Sunday.

After closing the gap to four points with his win on home soil, that is almost certain to increase again barring any incidents during the race.

Rosberg posted a time of one minute 16.540 seconds to the delight of the German fans, with Bottas joining him on the front row ahead of team-mate Felipe Massa.

Kevin Magnussen starts a fine fourth in his McLaren, equalling his best grid slot of the year achieved in the opening grand prix in Australia.

The Red Bulls of Daniel Ricciardo and four-times champion Sebastian Vettel line up fifth and sixth respectively, with Fernando Alonso in seventh in his Ferrari.

The top 10 is completed by Toro Rosso's Daniil Kvyat, followed by Force India pair Nico Hulkenberg and Sergio Perez in ninth and 10th.

Sauber's Esteban Gutierrez serves a three-place penalty for an incident in the last race at Silverstone, leaving Hamilton starting 15th.

Ahead of him in 11th will be McLaren's Jenson Button and Ferrari's Kimi Raikkonen, with Jean-Eric Vergne in his Toro Rosso 13th and Lotus' Romain Grosjean 14th.

Behind Hamilton will be Sauber's Adrian Sutil, then Gutierrez, followed by Marussia's Jules Bianchi, with the Frenchman doing a fine job to out-qualify the Lotus of Pastor Maldonado.

The back three will be the Caterhams of Kamui Kobayashi and Marcus Ericsson either side of Max Chilton in his Marussia in 21st.

Ericsson's participation is at the discretion of the stewards as he failed to set a time due to a hydraulics failure, but it is unlikely to be in doubt.

With four poles in his last five races, and nine in his career, this result continues Rosberg's great week after getting married, watching Germany win the World Cup and signing a new long-term contract.

"Things have been going really well, and to be at my home race and to get pole is fantastic," said Rosberg.

Sparing a thought for Hamilton, he added: "I would have preferred an open fight with Lewis, so I'm a little bit less happy he didn't have a shot at it at the end.

"We've still a long way to go as we've the race ahead, but even so it's a good start."

With the current searing temperatures of 33 degrees centigrade expected to drop on Sunday, with the threat of thunderstorms, that could alter proceedings in the race.

Rosberg added: "Tomorrow is due to be a lot cooler which will mean less degradation with the tyres, so we'll see how it goes."

Speaking about his accident, Hamilton said: "I'm in a little bit of pain, but that's what happens when you have a crash like that.

"Nico has now basically got another gift (with pole) but we will see what we can do tomorrow."