Lewis Hamilton turned it on at the right time to qualify on pole position for the Austrian Grand Prix.
The reigning champion had not topped a session all weekend at the Red Bull Ring but tuned in perfectly to beat Mercedes team-mate Nico Rosberg into second place - with both drivers spinning on their final attempts.
Hamilton, taking his seventh pole position in eight races this season, set a best time of one minute 08.455 seconds and was two tenths of a second clear of Rosberg - with the Ferrari of Sebastian Vettel third.
Austrian Grand Prix 2015 in pictures
Austrian Grand Prix 2015 in pictures
1/15 Saturday qualifying
Pastor Maldonado runs wide as he is eliminated in Q2
2/15 Saturday qualifying
Mercedes team-mates Roberg and Hamilton shake hands after qualifying
3/15 Saturday qualifying
Hamilton trails Vettel in their final run
4/15 Saturday qualifying
Daniil Kvyat out-qualified his Red Bull team-mate Daniel Ricciardo
5/15 Saturday third practice
A hare runs across the track during practice
6/15 Saturday third practice
Kimi Raikkonen leads Max Verstappen into turn two
7/15 Saturday third practice
Kimi Raikkonen attempts to return to the track after going off in the wet
8/15 Saturday third practice
Jenson Button had to change his engine and received a 25-place grid penalty
9/15 Saturday third practice
Marcus Ericsson out in the wet during practice
10/15 Saturday third practice
Sebastian Vettel topped third practice for the Austrian Grand Prix
11/15 Saturday third practice
McLaren's Fernando Alonso reacts during practice
12/15 Friday second practice
Carlos Sainz suffered near-miss with the barrier in second practice
13/15 Friday second practice
The Red Bull Ring's famous 'Bull' landmark as Sebastian Vettel flashes past
14/15 Friday first practice
Lewis Hamilton was three-tenths off the pace
15/15 Friday first practice
Nico Rosberg finished fastest in first practice for the Austrian Grand Prix
Hamilton's best effort came on the first run in Q3 before he ran wide on his last attempt - with Rosberg also skidding off to ruin his hopes of leapfrogging his title rival.
Hamilton had looked uncomfortable with the set-up of his car for much of the weekend as both Rosberg and Vettel got the better of the Brit at different stages.
He was 13th in a changeable first qualifying session and only squeaked through by three-tenths of a second and admitted he thought his spin at turn one had cost him pole position.
"It was quite a difficult qualifying session," he said.
"I was grateful that I got my best lap in early in Q3 - I was pushing for that bit extra and just locked the rear. I wasn't particularly concerned, I was trying to look after the car. Naturally, afterwards I was like 'I have probably lost it'."
He kept it because Rosberg also went off on the final corner of a lap that looked like challenging Hamilton's best.
"I'm not sure (what happened)," the German said of his spin.
"I went on the astroturf in the second to last corner, maybe it was a bit wet or I was pushing too hard. Lewis was two-tenths up on my time and that lap I was exactly two-tenths up. It is a very challenging track and easy to make mistakes."
Another fastest time for Hamilton means Mercedes have not been knocked off pole position since this race a year ago, when Williams locked-out the front row.
This time 2014 pole-sitter Felipe Massa was fourth behind Vettel's Ferrari, with team-mate Valtteri Bottas back in sixth as the Force India of Nico Hulkenberg split the Williams.
Max Verstappen qualified seventh after an impressive afternoon from the Toro Rosso teenager, with Daniil Kvyat eighth for Red Bull - although he will take a 10-place grid penalty.
Sauber's Felipe Nasr was ninth, with the Lotus of Romain Grosjean sitting out the final session due to technical problems.
Pastor Maldonado's Lotus was the closest to making it through to the top-10 shoot-out but the Venezuelan could only qualify 11th.
The second Sauber of Marcus Ericsson was next with Carlos Sainz down in 13th despite impressing earlier in the hour.
Daniel Ricciardo's poor weekend at Red Bull's home grand prix was compounded as he could only go 14th - with a 10-place grid penalty also to be applied.
Fernando Alonso was last in the second session but his McLaren will take a 25-place penalty after engine and gearbox changes.
With the early rain leaving some parts of the track wet, the majority of the field started the first qualifying session on intermediate tyres.
They soon dried out the circuit and reverted to the dry-weather rubber and, with the lap times tumbling, it was Raikkonen who was the big-name casualty.
The Ferrari man could not hook up a quick enough lap to make it through to the second part of qualifying as he joined Sergio Perez of Force India, Button's McLaren and the Manor pair of Roberto Merhi and Will Stevens in the bottom five.
Button - who, like Alonso, was hit with a 25-place grid penalty having had new components fitted to his car, had briefly held top spot but slipped out as the drying track levelled the playing field.
"Those conditions are always good fun," he told Sky Sports.
"It is not just about the car you're driving and the performance, you have to find your own feet. When the circuit dries it is basically about how quick the package is. I will have a 10 second penalty, I will come in during the first few laps of the race."
Final Positions after Qualifying:
1 Lewis Hamilton (Gbr) Mercedes GP 1min 08.455secs,
2 Nico Rosberg(Ger)Mercedes GP 1:08.655,
3 Sebastian Vettel(Ger)Ferrari 1:08.810,
4 Felipe Massa(Bra)Williams 1:09.192,
5 Nico Hulkenberg(Ger)Force India 1:09.278,
6 Valtteri Bottas(Fin)Williams 1:09.319,
7 Max Verstappen(Ned)Scuderia Toro Rosso 1:09.612,
8 Daniil Kvyat(Rus)Red Bull 1:09.694,
9 Felipe Nasr(Bra)Sauber-Ferrari 1:09.713,
10 Romain Grosjean(Fra)Lotus F1 Team No Time,
11 Pastor Maldonado(Ven) Lotus F1 Team 1:10.374,
12 Marcus Ericsson(Swe) Sauber-Ferrari 1:10.426,
13 Carlos Sainz(Spa) Scuderia Toro Rosso 1:10.465,
14 Daniel Ricciardo(Aus) Red Bull 1:10.482,
15 Fernando Alonso(Spa) McLaren 1:10.736,
16 Sergio Perez(Mex) Force India 1:12.522,
17 Jenson Button(Gbr) McLaren 1:12.632,
18 Kimi Raikkonen(Fin) Ferrari 1:12.867,
19 Roberto Merhi(Spa) Manor Marussia F1 1:14.071,
20 Will Stevens(Gbr) Manor Marussia F1 1:15.368
More to follow...Reuse content