Lewis Hamilton beat Sebastian Vettel's Ferrari to pole position for the Malaysian Grand Prix by less than a tenth of a second in a rain-affected Formula 1 qualifying session.
Hamilton's first flying lap on intermediate tyres in Q3 proved enough to secure top spot, as Vettel split the reigning F1 world champion from his Mercedes team-mate Nico Rosberg by qualifying second.
The two Mercedes drivers appeared to get in each other's way in the crucial closing stages of the session, and Hamilton failed to improve on his final run while Rosberg's final lap was only good enough for third.
Red Bull team-mates Daniel Ricciardo and Daniil Kvyat were fourth and fifth, just ahead of the Toro Rosso of teenaged rookie Max Verstappen, who rounded out the top six.
The drivers who began the session on full wet tyres and had to switch to intermediates filled the remaining spots in the top 10.
Romain Grosjean's Lotus split Williams drivers Felipe Massa and Valtteri Bottas, who could only manage seventh and ninth fastest times respectively, while Marcus Ericsson's Sauber rounded out the Q3 times.
A thunderstorm in the early stages of Q2 effectively reduced the second segment of qualifying to a single-lap shootout, and delayed the final session by half an hour.
The highest-profile casualty of the scramble for track position to get one dry lap in before the rain came was Ferrari's Kimi Raikkonen.
The 2007 world champion was delayed at the final corner trying to pass Ericsson's Sauber (the last car to make the cut in 10th) and by being passed by Hamilton's Mercedes at Turn 1, and wound up only 11th fastest.
Pastor Maldonado's Lotus, the Force Indias of Nico Hulkenberg and Sergio Perez (who both ran on used medium tyres), and the Toro Rosso of Carlos Sainz Jr - who impressively matched Vettel in setting the fourth fastest time in Q1 - were also eliminated.
Australian GP star Felipe Nasr failed to escape Q1, having struggled to get comfortable with his Sauber's handling since taking his car back from Ferrari junior driver Raffaele Marciello after the first practice session on Friday.
The Brazilian qualified almost three tenths adrift of Perez and the same margin ahead of Jenson Button's McLaren-Honda.
McLaren failed to get either of its cars out of Q1 for the second straight race, as Button and returning team-mate Fernando Alonso wound up 17th and 18th fastest.
Manor GP has at least completed track running this weekend, but failed to qualify within the 107 per cent cut-off in Q1.
Roberto Merhi set a time almost half a second too slow to make the cut-off (7.4s shy of the outright pace), while a fuel system problem discovered in morning practice confined his team-mate Will Stevens to the garage, so he failed to set a time.
However, Stevens registered a lap quick enough to make the cut in the second free practice session on Friday.
Previously the stewards have allowed cars to start the race in such circumstances, even if they haven't posted a time in qualifying.
PROVISIONAL STARTING GRID:
|4||Daniel Ricciardo||Red Bull/Renault||1m51.541s||1.707s|
|5||Daniil Kvyat||Red Bull/Renault||1m51.950s||2.116s|
|6||Max Verstappen||Toro Rosso/Renault||1m51.980s||2.146s|
|13||Nico Hulkenberg||Force India/Mercedes||1m43.022s||-|
|14||Sergio Perez||Force India/Mercedes||1m43.468s||-|
|15||Carlos Sainz||Toro Rosso/Renault||1m43.700s||-|
* Grosjean received two-place grid penalty for pitlane infringement