Lewis Hamilton passed Max Verstappen with three laps remaining to win the Hungarian Grand Prix.
Hamilton was within one second of Verstappen when he was called in for a second pit stop – Mercedes hoping that a switch to fresh tyres would provide the British star with a chance to usurp Verstappen.
The strategy move by Formula One's all-conquering team proved inspired.
Hamilton left the pit lane 21 seconds behind Verstappen with 21 laps remaining, the Briton lighting up the time sheets before catching the back of Verstappen's Red Bull.
The world champion then made the move for victory stick around the outside of Verstappen on lap 67.
Ferrari's Sebastian Vettel finished third ahead of his team-mate Charles Leclerc.
Hamilton will now head into the summer break with a mammoth 61-point championship lead over Valtteri Bottas.
The Finnish driver ended the race in eighth place after he had to stop for a new front wing following a collision with Leclerc on the opening lap.
"Wow, just wow, mate," said Hamilton's engineer, Pete Bonnington.
"What a drive. What a strategy."
Hamilton replied: "That was a tall order but I am grateful you did it. That feels so good. I hope you are feeling it too."
Verstappen has not been hot off the line in recent races, but the pole-sitter retained the lead with a near-perfect start on the long charge down to the opening corner.
Verstappen moved to cover off both Mercedes cars, but a sloppy start from Bottas – the Finn locking up twice in three corners – allowed Hamilton to blast around his team-mate on the outside of the left-handed third bend before making the move stick into turn four.
Verstappen and Hamilton raced off into the distance and when the former stopped for new rubber on lap 24, he was less than a second ahead of his rival.
Mercedes kept Hamilton out, and when he eventually stopped six laps later, he emerged six seconds down.
But Hamilton put his foot down and wiped out Verstappen's lead in a handful of laps. On lap 39, Hamilton sensed his opportunity, and in a gung-ho move for victory fell off the track at the fourth bend.
Hamilton fell back, and started to reel Verstappen back in before Mercedes made the strategy call which won Hamilton the race.
Stopping for new rubber for a second time, Hamilton was way down on Verstappen.
"I don't know if that was the right call, mate," said Hamilton over the radio.
"Copy that, Lewis," came the response from Bonnington.
"We think you have got the pace."
And so it proved with Hamilton claiming his seventh win in Hungary and the 81st of his career.
"I feel tired which is how it should be," said Hamilton. "To be able to push like that, I am telling you I was on the limit.
"I didn't know if I could catch the gap but the team told me to keep my head down and I kept pushing. The laps were like qualifying laps. If Niki (Lauda) was here today he would take his hat off."
Carlos Sainz finished fifth for McLaren ahead of Red Bull's Pierre Gasly. Lando Norris crossed the line in ninth after a slow pit stop.