Lewis Hamilton’s hopes of winning the world championship were dealt a huge blow in Germany after he qualified only 14th following a mechanical failure, while his rival Sebastian Vettel stormed to pole position.

Ferrari driver Vettel delivered a blistering lap in the dying moments of qualifying to see off the competition from Hamilton’s Mercedes team-mate Valtteri Bottas and take the front slot on the grid. Kimi Raikkonen qualified third in the sister Ferrari.

Vettel’s breathless lap was greeted by huge cheers from the Hockenheim crowd, with the German now the overwhelming favourite to extend his championship lead over a crestfallen Hamilton.

Hamilton, eight points adrift of Vettel, reported over the radio that he couldn’t change gear, and moments later he was told to stop his Mercedes to prevent further damage to his machinery.

The defending champion had already posted a time quick enough to make it through to the second phase, so, at first, he resisted. “No, I don’t want to,” he said.

Hamilton’s hope was that would be able to get his car back to the garage to afford his team time to fix the problem. But after his race engineer Pete Bonnington demanded he pull up at the side of the track, Hamilton obliged.

In dramatic scenes, the Englishman then attempted to push his Mercedes car back to the garage. Having stopped at turn 10, however, and with a third of the 2.8-mile circuit still to complete before he reached the pits, it dawned on the Briton that his desperate attempts would be in vain.

For several seconds, an emotional Hamilton, with his crash helmet still on, crouched over his stricken Mercedes car appearing to search for answers for his qualifying demise.

“I didn’t really understand exactly what had happened so in my mind I was thinking, ‘Get the car back to the track’, but they asked me to turn the car off,” Hamilton explained. “I jumped out and wanted to push it back but it was so far to go.

“I saw there was leaking oil and I knew that I had to stop and let the marshals put the car away somewhere. I have the will to not want to give up. I just want to keep pushing.”

Nico Rosberg, Hamilton’s former long-term rival, said in the Sky Sports commentary booth: “I’ve never seen body language like this from Lewis. This is a huge setback.”

Hamilton’s Mercedes team confirmed the stoppage, which indeed hands the initiative to Hamilton’s rival Vettel, was due to a hydraulics failure.

The British driver’s title defence has been blighted by a series of Mercedes setbacks, and his latest failure here will add to both his and the team’s worries.

Mercedes have dominated the sport for the past four years, but the increased competition from both Ferrari and Red Bull has allowed for a series of mechanical and strategical errors to rock Hamilton’s campaign.

With Hamilton out of the action, the Englishman will have hoped that Mercedes team-mate Bottas would stop Vettel from taking the spoils.

But the Finn had no answer for Vettel, who stole pole from Bottas with his final throw of the dice to finish 0.204 seconds clear of the Mercedes car.

“The last lap I had a bit left in me and I managed to squeeze everything out of the car,” a jubilant Vettel said. “I’m still full of adrenaline.”

Max Verstappen finished fourth for Red Bull ahead of the Haas duo of Kevin Magnussen and Romain Grosjean.

Daniel Ricciardo, already facing a grid penalty for engine part changes, did not set a time in Q2. He is set to start last.