Mercedes have taken their 19th consecutive Formula 1 pole thanks to Lewis Hamilton at the Austrian Grand Prix.
The Englishman edged out teammate and championship rival Nico Rosberg for his seventh pole in eight races this season.
Hamilton was ahead after the opening moments of the final session, but then lost control in the closing seconds as he tried to improve his time, opening the door for Rosberg who proceeded to mimic his teammate by also spinning off track.
Sebastian Vettel of Ferrari was the quickest man in second and third practice, but couldn't get near the Mercedes in Q3 and had to settle for third on the grid.
In the first session, light rain at the Red Bull Ring meant that cars started on the intermediate tyres before having to switch to slicks in the closing minutes.
It led to a frantic finish and championship leader Hamilton almost crashed out by recording the 13th-fastest time of Q1. The biggest casualty was Ferrari's Kimi Raikkonen, who only had the Manors behind him.
The McLarens of Fernando Alonso and Jenson Button qualified in 15th and 17th respectively, but they will start from the back of the grid after incurring hefty penalties for making too many engine alterations.
Red Bull's Daniel Ricciardo failed to reach Q3 for the first time this season, managing just 14th as teammate Daniil Kvyat squeezed into the top 10.
1. Lewis Hamilton (Mercedes)
2. Nico Rosberg (Mercedes)
3. Sebastian Vettel (Ferrari)
4. Felipe Massa (Williams)
5. Nico Hulkenberg (Force India)
6. Valtteri Bottas (Williams)
7. Max Verstappen (Toro Rosso)
8. Daniil Kvyat (Red Bull)
9. Felipe Nasr (Sauber)
10. Romain Grosjean (Lotus)
11. Pastor Maldonado (Lotus)
12. Marcus Ericsson (Sauber)
13. Carlos Sainz (Toro Rosso)
14. Daniel Ricciardo (Red Bull)
15. Fernando Alonso (McLaren)
16. Sergio Perez (Force India)
17. Jenson Button (McLaren)
18. Kimi Raikkonen (Ferrari)
19. Roberto Merhi (Manor)
20. Will Stevens (Manor)