Valtteri Bottas won a sprint race to put his Mercedes on pole position at the Sao Paulo Grand Prix on Saturday as Red Bull's Max Verstappen extended his Formula One championship lead to 21 points.
Seven times world champion Lewis Hamilton made a sensational, aggressive charge from last on the grid, after being disqualified from a qualifying session he dominated on Friday, to fifth.
The Mercedes driver will start 10th on Sunday after a five-place penalty for an engine change.
"It's not over yet," Hamilton said over the team radio after gaining 15 positions in 24 laps.
He finished with a flourish, sweeping past the McLaren of fellow-Briton Lando Norris on the last lap as the crowd stood and cheered.
"I honestly had no idea what was possible. I didn't set a limit or a maximum," said Hamilton, who would have started at the front but was demoted to the back after his car's rear wing failed a technical check.
"Then all of a sudden I was chipping away at it much faster...you can't give up, you've just got to keep pushing."
Bottas took three points for the sprint win, stretching Mercedes' lead over Red Bull in the constructors' standings to two points and also doing Hamilton a service.
Verstappen, who had lined up in the number one slot, lost out to Bottas at the start and was then also passed by Ferrari's Carlos Sainz.
The Dutch 24-year-old took back second on lap four and stayed there to bank the two points.
"The start was the key thing for me," said Bottas, who has now taken pole at three of the last four races. "We gambled a bit with the soft tyre, we knew it would be a benefit at the start and it worked."
Sainz was third, after also opting to start on the soft tyres, and took the final point available with Red Bull's Sergio Perez fourth.
Sunday's race will be almost three times longer and Hamilton, with a fresher engine than those ahead of him, will be targeting the podium -- and could even be in with a chance of the win.
"Brilliant drive. Damage limitation," said Mercedes team boss Toto Wolff after a difficult day.
Norris and Ferrari's Charles Leclerc will share the third row in fifth and sixth respectively after Hamilton's penalty with AlphaTauri's Pierre Gasly seventh and Alpine's Esteban Ocon eighth.
Aston Martin's four times world champion Sebastian Vettel starts ninth and just ahead of Hamilton.
The sprint was the third race weekend of the year using the experimental format, after Silverstone and Monza, and Formula One managing director Ross Brawn liked what he saw.
"This sprint was the best one so far with plenty of action and a great crowd to witness it all," said the Briton, who plans to expand the format to six rounds next year.
"The drama off the track created something fixating on it, with Lewis overtaking car after car. Without the sprint, he would be at the back of the grid for tomorrow's race but instead he has a real chance tomorrow."