Lewis Hamilton staged a thrilling fightback to catch and pass Max Verstappen for victory in the Hungarian Grand Prix.
Hamilton's eighth win of the season puts a headlock on the championship after a tense race-long battle between the drivers and their strategists at the Mercedes and Red Bull teams.
Hamilton came very close to pulling off a brave move for the lead around the outside of the 150mph Turn Four.
But a gamble by Mercedes to make an extra pit stop gave Hamilton much faster tyres for the closing stages and he closed a 20-second deficit in less than 20 laps to pass Verstappen for the lead with three laps to go.
It puts Hamilton 62 points ahead in the championship with nine races to go - and a maximum of 234 points available. His sixth title is as good as won.
Changing of the guard? Not yet, according to Hamilton, who took his 81st career win
Stalemate - then a heart-stopping moment
It was a mouth-watering fight between the greatest driver of his generation, Hamilton, and the man who is emerging as the leader of the next, and the first time they had disputed a grand prix victory in such a way.
The two were in a race of their own, with the Ferraris more than a minute behind at the flag and Hamilton's team-mate Valtteri Bottas taken out of contention by a touch with Hamilton and then Ferrari's Charles Leclerc on the first lap, which broke the Finn's front wing.
There was stalemate between Verstappen and Hamilton in the first stint, after the Dutchman converted pole position into a lead at the first corner, and Hamilton moved into second by passing Bottas, who had qualified ahead, into the second corner.
But as the time for pit stops approached, Hamilton closed right in on Verstappen, forcing Red Bull into an early stop on lap 25 to ensure Mercedes did not do the same and 'under-cut' them into the lead.
Close at the start, but Verstappen held on to the lead from his first career pole position
Mercedes left Hamilton out for another six laps, hoping to benefit from fresher tyres at the end of the race.
Hamilton rejoined six seconds behind, but was on Verstappen's tail within four laps and attacking hard.
But the Hungaroring is a notoriously difficult track on which to overtake and Hamilton was forced to improvise.
On lap 38, he was closer than ever to Verstappen and after tracking him through Turns One, Two and Three, Hamilton tried a bold move around the outside of Turn Four.
It would have come off, but for a flick of oversteer in the middle of the corner and he ran into the run-off area, giving Verstappen some breathing space.
The Verstappen fans packed the grandstands in their thousands at the Hungaroring
A gamble that paid off
After another 10 laps of closely following Verstappen, and conversations with the team about how hard passing was going to be, Mercedes took a risk.
They called Hamilton for fresh medium tyres on lap 48, with 22 to go, the idea being to come back at Verstappen with fresher tyres at the end of the race.
For a while, it looked like it would not work. Hamilton was 20 seconds adrift when he rejoined from the stop and in seven laps had only gained just over four seconds.
But with 13 laps to go, Hamilton started to turn on the pace and take chunks out of Verstappen's lead.
With 10 laps to go, Hamilton was 11 seconds behind, but five laps later he was on Verstappen's tail, and his closing speed was so superior that he swept easily into the lead around the outside of Turn One at the start of lap 67.
Where were the Ferraris?
The Ferraris were next best, but they were in a separate race, losing nearly a second a lap throughout the race.
Leclerc was in third for much of the race but while he went for a conventional strategy, Sebastian Vettel was never far behind and he ran long on his first stint and fitted soft tyres for his second stint, while Leclerc was on hards.
Vettel closed in gradually in the second stint and passed Leclerc for third with two laps to go.
"It will be a busy break for us." Vettel feels Ferrari have work to do over the summer
McLaren's Carlos Sainz drove another excellent race to be best of the race in fifth, impressively beating the Red Bull of Pierre Gasly into sixth.
Alfa Romeo's Kimi Raikkonen was seventh, ahead of Bottas, who fought back also on a two-stop strategy after dropping to last following an early stop to replace his front wing.
Lando Norris took ninth in the second McLaren after being passed by Sainz at the start and delayed by a slow pit stop, and Anglo-Thai Alexander Albon passed the Racing Point of Sergio Perez for 10th in the closing laps to take the final point.
-- Courtesy of BBC Sport