Championship leader Nico Rosberg took pole position for Azerbaijan's first Formula One Grand Prix on Saturday after Mercedes team mate and title rival Lewis Hamilton hit a wall and qualified only 10th.
Mexican Sergio Perez qualified second for Force India but will drop five places due to an unscheduled gearbox change after he crashed in final practice on the Baku street circuit.
That demotion lifted Red Bull's Australian Daniel Ricciardo to the front row for Sunday's European Grand Prix with Ferrari's Sebastian Vettel third and the German's Finnish team mate Kimi Raikkonen fourth.
"They've done a great job up to now, with the track especially," said Rosberg, who had been slower than triple world champion Hamilton in practice but may yet have the last laugh.
"It was an exciting qualifying. It's one of the easiest places to overtake so it should be an exciting race."
The pole was the 25th of Rosberg's career and first since Russia in April when Hamilton also qualified 10th after an engine failure.
The German won that race with Hamilton second.
Saturday's pole will have been all the sweeter for the German after Hamilton criticised rivals, including Rosberg, for 'moaning' about details of the street circuit whose layout winds around ancient city walls but also has long straights.
The final phase of qualifying was halted with two minutes remaining after Hamilton, winner of the previous two races and nine points adrift of Rosberg in the standings, misjudged Turn 10 and smashed his front right suspension.
Rosberg was out of his car by the time the session resumed but, with Hamilton no longer a threat, his pole time of one minute 42.758 seconds was safe.
"I can't really say yet what possibilities there are but obviously I have to try and get up as high as possible tomorrow. It is damage limitation from here and I will do what I can," said Hamilton.
"I had a fantastic rhythm yesterday but zero today. Sometimes it happens," added the Briton, who was fastest in all three practice sessions but went into the runoff area twice in the last two phases of qualifying.
The first incident 'flat-spotted' a front tyre, a worn patch where the wheel locked up under braking, from the set he is supposed to use in Sunday's race unless they are too badly damaged.
Ricciardo and Vettel, former team mates at Red Bull, recorded exactly the same time of 1:43.966 but the smiling Australian got the nod for crossing the finish line first.
Brazilian Felipe Massa, for Williams, and Russian Daniil Kvyat, in a Toro Rosso, share the third row.
At the back, Manor could no longer be described as tail-enders after Indonesian Rio Haryanto and Germany's Pascal Wehrlein qualified 17th and 18th.
That was ahead of 2009 world champion Jenson Button's McLaren, Sauber's Marcus Ericsson and the Renaults of Kevin Magnussen and Jolyon Palmer.