Nico Rosberg put Formula One world champions Mercedes on pole position for the Japanese Grand Prix after Red Bull's Daniil Kvyat crashed heavily and brought qualifying to an early close.
The German secured his first pole since Spain in May when the red flags came out with 36 seconds remaining, leaving team mate and championship leader Lewis Hamilton no chance of claiming a 12th pole in 14 races.
Hamilton, who has a 41-point lead over Rosberg with six races left, missed out by 0.076 seconds but made sure of an all-Mercedes front row to the relief of a team that was eclipsed in Singapore last weekend.
"A good comeback for the team after such a difficult weekend in Singapore. We really turned things around... I pretty much nailed my laps today. I'm really pleased with the way it went," said Rosberg.
"At times today I had the perfect car."
The front row was a repeat of last year's at Suzuka, a wet race overshadowed by French driver Jules Bianchi's tragic accident in the closing stages and that Hamilton won on his way to a second world championship.
Finland's Valtteri Bottas qualified third for Williams on a dry track after Friday's rain with Ferrari's Sebastian Vettel, victorious in Singapore and a four-time winner in Japan, lining up in fourth place.
"The first lap I lost a bit of time into Turn 11 and I think in the last corner," said Hamilton.
"Nico is driving well this weekend but I definitely felt pretty good on that last lap, but the main thing is that Kvyat is OK."
The Russian was unhurt in his dramatic crash, losing control of the rear of his car after going wide onto the grass as he approached the hairpin.
Snapping sideways, the car was pitched into a tyre wall and flipped over before coming to rest with the wheels torn off the left side. Kvyat assured the team he was OK and then slowly extricated himself unaided.
Starting grid (top-10):
1. Nico Rosberg (Germany) Mercedes
2. Lewis Hamilton (Britain) Mercedes
3. Valtteri Bottas (Finland) Williams-Mercedes
4. Sebastian Vettel (Germany) Ferrari
5. Felipe Massa (Brazil) Williams-Mercedes
6. Kimi Raikkonen (Finland) Ferrari
7. Daniel Ricciardo (Australia) RedBull - Renault
8. Romain Grosjean (France) Lotus - Mercedes
9. Sergio Perez (Mexico) Force India - Mercedes
10. Daniil Kvyat (Russia) RedBull - Renault