Lewis Hamilton took pole position for the Malaysian Grand Prix as title rival Sebastian Vettel suffered from engine trouble to leave him last on the grid.
The Mercedes of Hamilton will start from the front in Sepang on Sunday as he looks to increase a 28-point lead over Vettel's Ferrari in the championship fight.
Hamilton offered his condolences to Vettel and admitted he was not expecting to be celebrating his fifth pole position in Malaysia after his weekend leading into qualifying.
"We had no idea how it was going to go today," he said.
"I'm sorry what happened to Sebastian but we somehow turned it around, it is a real surprise to be up here with these guys.
"We will have a tough battle. I'm hoping our car has moved in the right direction for the race."
Hamilton had been struggling for pace all weekend but was able to light up the timesheet at the right moment and will start first ahead of Vettel's team-mate Kimi Raikkonen and the Red Bull of Max Verstappen.
Hamilton had suffered from a "very difficult" Friday but recovered to take his 70th pole position in Formula One with a time of one minute 30.076 seconds.
Vettel had surprisingly held the upper hand over Hamilton throughout practice but suffered an issue in the final session and required a new engine.
Although his mechanics completed the work in time for qualifying, Vettel complained of a lack of turbo during his first timed run and ultimately sat the session out in the garage to leave him at the back of the grid on Sunday.
"It's part of motor racing," the German told Sky Sports F1.
"It's not ideal, not what you want when you think you've got it in you. We've saved some tyres so that's a positive but it's a very bad day.
"We need to see now what the problem was. The guys worked a miracle today and did the change successfully in time. They fixed it quickly and it's a shame I couldn't get out. but we go tomorrow."
Vettel will now put plenty of faith in team-mate Raikkonen, who ran Hamilton close for pole but ultimately missed out by less than 0.1 secs.
Verstappen took third for Red Bull on his 20th birthday, with his team-mate Daniel Ricciardo in fourth.
Hamilton's team-mate Valtteri Bottas is fifth ahead of Esteban Ocon's Force India while Stoffel Vandoorne was seventh for McLaren.
Nico Hulkenberg will start eighth with Segio Perez ninth for Force India and the second McLaren of Fernando Alonso rounding out the top 10.