Mercedes' Valtteri Bottas won a sprint race for pole position at the Sao Paulo Formula One Grand Prix on Saturday as Red Bull's Max Verstappen extended his championship lead to 21 points.

Seven-time world champion Lewis Hamilton charged from last on the grid, after his car failed a technical inspection on Friday, to fifth and will start 10th on Sunday after a five-place penalty for an engine change.

"It's not over yet," Hamilton told Mercedes over the team radio after a sensational, aggressive drive that saw him gain 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.

F1: Hamilton disqualified from Sao Paulo qualifying 

  F1: Verstappen fined 50,000 euros for touching Hamilton's car  

"Then all of a sudden I was chipping away at it much 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.

Verstappen, who had lined up at the front of the grid, lost out to Bottas at the start and had to settle for second place and two points.

"The start was the key thing for me," said Bottas. "We gambled a bit with the soft tyre, we knew it would be a benefit at the start, and it worked."

Carlos Sainz was third for Ferrari and took the final point available.

Sunday's race will be three times longer and Hamilton, with a fresher engine than those ahead of him, will be targeting the podium.

"Brilliant drive. Damage limitation" said Mercedes team boss Toto Wolff.