SPIELBERG, Austria (AP) Lewis Hamilton clinched the pole position for the Austrian Grand Prix in a qualifying session marked by a heavy crash and a rain delay on Saturday.
Mercedes teammate and Formula One leader Nico Rosberg was second, but he will be dropped five places on the starting grid in Sunday's race because of an unscheduled gearbox change after crashing in the final practice hours earlier.
''It was a real fun session,'' Hamilton said.
Nico Hulkenberg of Force India was third, followed by Sebastian Vettel of Ferrari, Jenson Button of McLaren, Kimi Raikkonen of Ferrari, Daniel Ricciardo of Red Bull, and Valtteri Bottas of Williams.
Vettel will also drop five slots because of a gearbox change.
Daniil Kvyat crashed heavily, causing a 16-minute red flag, and then the second Toro Rosso driven by Carlos Sainz blew its engine in the first of the three qualifying sessions.
With the penalties considered, Hamilton and Hulkenberg will be in the front row; Button and Raikkonen on the second; Ricciardo and Bottas on the third, Rosberg and Max Verstappen on the fourth, and Vettel and Felipe Massa on the fifth.
A rain shower sent the cars into the pits late in the second session and the biggest action came right at the end of the third session, after the track dried and the cars switched to softer, faster tires.
F1 defending champion Hamilton gained his third straight pole in Austria. But the first two races on the Red Bull Ring went to Rosberg, who will have a much tougher time from the back.
''I was chipping away where I was losing time, and eventually I finally got into the position to go for pole and then the rain came,'' Hamilton said after clinching his fifth pole of the season and the 54th of his career.
''It's incredible how fast it dries up here, it's like driving through fog. It was very, very slippery, but it was drying up corner by corner. At the end it was just about getting that last lap. I'm very happy.''
Rosberg was lucky just to get on the track after a crash in the morning practice left his car badly damaged, including a broken suspension, a common problem over the past two days.
''Even Lewis' mechanics worked on my car and we got it ready 11 minutes before qualifying,'' said Rosberg, who holds a 24-point lead over Hamilton in the series standings as he looks for his first championship. He has five wins this season.
''It's unbelievable how the track got dry so quickly and we were able to get on softs in the end,'' Rosberg said. ''The five-place penalty will be very costly tomorrow but I'll try to make the best of it.''
Rosberg crashed after hitting a curb, although it wasn't over the new yellow ones. But Hamilton was critical of the curbs nevertheless.
''For me, those yellow curbs are quite dangerous, we've seen a couple of incidents already. I don't know how many more it's going to take before a car ends up in the wall and perhaps someone gets hurt,'' he said.
''The idea is good because they definitely don't want us running wide and using the outside of the circuit, but perhaps another solution is going to be needed.''
Four-time champion Vettel said he should have taken more risks.
''In the end it was a bit of a gamble - the later you ran the better,'' he said. ''But equally I could and should have taken more risks.
''There was more pace in the car for sure. If you look at the gaps, that's not down to the car performance. It mattered when you crossed the line and how much risk you took, so for sure I underperformed.''