The German Formula One driver Nico Rosberg has put his Mercedes on pole position for his home Grand Prix.
It was a fifth pole position of the year for Rosberg, who leads the drivers standings, and the ninth of his career.
His main rival for this year's world title, team-mate Lewis Hamilton, crashed out in the first qualifying session and will start from 15th on the grid in Germany.
Finland's Valtteri Bottas was second fastest ahead of his Williams teammate Felipe Massa of Brazil while Red Bull's Daniel Ricciardo was fifth ahead of his world champion teammate Sebastian Vettel.
Former champion Hamilton crashed at more than 250km/h after his brakes failed.
The Briton climbed out of his car shaken and winded but with no apparent serious injury.
The impact came after the Mercedes driver's brakes failed on entry to the hairpin leading into the stadium section of the Hockenheimring.
Hamilton was able to tell the team he was okay by radio and was driven to the race medical centre for an examination.
"I hit something," Hamilton told the team. "I hit... hit the brakes - the brakes failed."
The session was red flagged to a halt for repairs to the barriers, notably a wall of tyres into which Hamilton's car plunged on impact as he lost control.
The front of his car suffered most damage.
For Hamilton, it was a major setback after he had managed to reduce Rosberg's lead to just four points with a victory in the British Grand Prix where the German retired.
It is the first time Hamilton has failed to proceed to the third part of qualifying, the top ten shootout, since the 2010 Malaysian Grand Prix.