Valtteri Bottas sprung the biggest surprise of the season so far after he beat Lewis Hamilton in Bahrain qualifying to secure the first pole position of his career.

Hamilton appeared set to claim his seventh pole on the spin, and 64th of his career, before Bottas - the man who has replaced champion Nico Rosberg at Mercedes this season - edged out his team-mate with the final throw of the dice.

Hamilton's championship rival Sebastian Vettel lines up in third with the Red Bull of Daniel Ricciardo fourth on the grid.

Ferrari, starved of championship glory for a decade, have finally produced a car which appears capable of challenging once more for motor racing's biggest prize.

And, prior to qualifying, there had been a sense of a changing of the guard after Mercedes failed to top either of the three practice sessions for the first time since the start of the 2014 season.

But as has so often been the case for the past three seasons, they delivered when it mattered most.

It was not Hamilton however, who will line up on the front slot on Sunday, but Bottas after he edged out his team-mate by just two hundredths of a second over 3.4 miles of track.

Hamilton was quickest in Q1, Q2 and then seemingly in the shoot-out for pole, only for the Finn to nick it in the closing seconds with his best lap of one minute and 28.769 seconds.

Indeed the former Williams driver was the only one of the front-runners to improve his time in their second and decisive runs.

Kimi Raikkonen, under pressure from Ferrari following two disappointing rounds, is fifth with Max Verstappen sixth.