Sahara Force India registered their best qualifying performance this season with Paul di Resta and Adrian Sutil setting the seventh and eighth fastest times at the Formula One Bahrain Grand Prix in Manama on Saturday.
Di Resta, who clocked 1m 33.235s in Q3, continued to overshadow his German team-mate Sutil (1m 33.246s).
Nico Rosberg snatched Mercedes' second pole position in a row when his lap of 1m 32.330s beat Sebastian Vettel's best of 1m 32.584s in the Red Bull.
Two-time world champion Fernando Alonso of Ferrari was third fastest.
Hamilton, who clocked fourth fastest time in the qualifying, was handed a five-place grid penalty for a gear box change in Saturday’s final free practice session and will now start the race ninth.
In the second Ferrari, Brazilian Felipe Massa will start from fourth place after qualifying sixth behind Australian Mark Webber, who was given a three-place grid penalty brought forward from last weekend's Chinese Grand Prix.
Like Di Resta and Sutil, Lotus' Kimi Raikkonen also profited from the penalties as he starts seventh after originally finishing ninth, while McLaren's Jenson Button will complete the top 10.
Bahrain GP: Hamilton gets five-place grid penalty
Rosberg takes pole for Mercedes in Bahrain
Di Resta gets Force India four points, Sutil retires
Chinese GP: Team-by-team analysis
We are better force now: Mallya