Robert Kubica secured the first pole position of his Formula One career at the end of a stunning qualifying session for tomorrow's Bahrain Grand Prix.

Felipe Massa had earlier dominated at the Sakhir circuit, and it was fully expected he would be at the front, as he was last season in his Ferrari when he won after leading from pole to flag.

But for the first time since the race in China in October 2006, a Ferrari or McLaren missed out on pole, as BMW Sauber star Kubica again proved that this season will not be a two-horse affair.

On an extremely windy circuit, Kubica edged out Massa by less than 0.2secs, with current championship leader Lewis Hamilton in third in his McLaren.

Thrilled BMW Sauber boss Mario Theissen said: ''Fantastic. A great effort. Thankyou.'' Crucially for Hamilton, the young Briton has main title rival Kimi Raikkonen behind him, with the Finn a surprisingly low fourth as Ferrari had previously appeared impregnable on this track.

Heikki Kovalainen was fifth in his McLaren, followed by the second BMW Sauber of Nick Heidfeld, Jarno Trulli in his Toyota and the Williams of Nico Rosberg.

Jenson Button was a superb ninth in his Honda, with two-time world champion Fernando Alonso in 10th for Renault.

For the first time this season Button will start in the top 10 after edging out Red Bull's Mark Webber for a place in Q3 by a slender 0.090secs.

Button's Honda team-mate Rubens Barrichello starts 12th, with Timo Glock 13th, the young German missing out on Q3 for the first time this season.

Glock has behind him Nelson Piquet in his Renault, Toro Rosso's Sebastien Bourdais and the Williams of Kazuki Nakajima, the Japanese driver in his rookie year and so far finding qualifying a major struggle.

Takuma Sato will start at the back of the grid after a minor accident midway through the initial 20-minute qualifying session.

Sato lost the rear end of his Super Aguri after running wide at the final turn into the start-finish straight.

The Japanese driver slid across the track and unfortunately just clipped the tyre barrier at the end of the pit lane, breaking his rear suspension and rear wing.

The incident ultimately caused a red flag, with the session held up for five minutes, resulting in a mad dash for the majority of the field in the closing stages.

The biggest loser was David Coulthard who will start in a lowly 17th place, which will come as a huge disappointment to the veteran Scot and the team.

Coulthard had run well in practice, but he said: ''The only time that counts is qualifying and the race. Winter testing and practice sessions mean nothing.

''Too much oversteer on my laps meant I was unable to push and attack the marginal time I needed to get through.'' Behind Coulthard come the Force India duo of Giancarlo Fisichella and Adrian Sutil, sandwiching Toro Rosso's Sebastian Vettel in 19th, with Anthony Davidson ahead of team-mate Sato.