Nico Rosberg took pole position for the German Grand Prix on Saturday, carrying forward his sublime practice form into qualifying.
Rosberg had to abort his first run due to an electrical issue, allowing Hamilton to take provisional pole position.
Once back on track, the German immediately went quicker with 1:14.363 - a time that would prove enough to grab pole on his home turf.
Hamilton had to settle for second position, the Englishman clocked the Hockenheim circuit in 1:14.726, a tenth shy of his Mercedes teammate.
Red Bull locked the second row of the grid, with Daniel Ricciardo outpacing Max Verstappen by just over a tenth of a second.
The formation continued to row three with Kimi Raikkonen and Sebastian Vettel qualifying fifth and sixth, the Finn quicker of the two Ferraris at this occasion.
Nico Hulkenberg was best of the rest in seventh place, outqualifying the Williams of Valtteri Bottas on his home ground.
Their teammates Sergio Perez and Felipe Massa will start just behind from the fifth row of the grid.
Neither of the McLaren made it to the final part of qualifying, despite showing top 10 pace throughout practice.
by Rachit Thukral