Lewis Hamilton fought back to pass both Valtteri Bottas and Max Verstappen for a brilliant victory in the Portuguese Grand Prix.
The seven-time champion fell to third as Verstappen's Red Bull overtook him at a restart after an early safety car.
But he passed Verstappen four laps later and then hunted down and did the same to his Mercedes team-mate before moving on to control the race.
The win gives Hamilton an eight-point championship lead over Verstappen.
It was a statement race for Hamilton, who has moved on to 97 career Grand Prix victories, and a clear demonstration of his unquenched desire to secure a world record eighth world title this year.
But he missed out on the point for fastest lap after both Verstappen and Bottas pitted for fresh tyres to chase it in the closing laps.
The Dutchman, bidding to minimise the damage in his fight with Hamilton for the title, thought he had taken it - although his time was deleted for going beyond track limits, and so the point went to Bottas instead.
No answer to Hamilton
Hamilton lost out to Bottas in the fight for pole position on Saturday by just 0.007 seconds and the two Mercedes, with Verstappen behind, moved away in formation at the start.
But a safety car was triggered on lap two when Kimi Raikkonen drove into the back of Alfa Romeo team-mate Antonio Giovinazzi on the pit straight and tore off his front wing.
At the restart, Bottas waited until he was halfway around the final corner before accelerating away and Verstappen anticipated the situation perfectly, sweeping past Hamilton in a superlative move around the outside of Turn One.
Verstappen stayed right behind Bottas but could not pass him and was soon under pressure from Hamilton, determined to repay the compliment.
At the end of lap 10, Verstappen had a slide on the exit of Turn 14, the effective final corner, and Hamilton grabbed his chance, closing on the Red Bull and repassing Verstappen.
The Dutchman defended to the inside, but Hamilton squeezed alongside him there anyway over the dusty part of the track to claim the corner.
Next, it was Bottas' turn to fall prey to Hamilton, who tracked his team-mate closely for nine laps before pulling off a lovely outside pass at Turn One.
The race was now Hamilton's to lose, and he was always in control, as the focus turned to the fight for second between Bottas and Verstappen.
The decisive moments came around the pit stops.
Red Bull brought Verstappen in first on lap 35, with Bottas following him in a lap later.
The Mercedes retained the lead, but Verstappen was close behind the Finn as he came out of the pits, and Bottas' fate was sealed when he had huge slide on the exit of Turn Three.
Verstappen closed right up and passed into the hairpin at Turn Five. Bottas dropped three seconds back from the Red Bull before coming back for a few laps, but then fell away again as the top three positions were sealed.
Alonso's recovery drive
Sergio Perez took fourth for Red Bull, ahead of McLaren's Lando Norris and Ferrari's Charles Leclerc, who moved up from his disappointing eighth place on the grid partly thanks to his ability to start on the medium tyre because he was fast enough to make it through second qualifying on it.
That put him in a stronger strategic position than team-mate Carlos Sainz, who started fifth on the softs, and after their pit stops, Leclerc closed up to Sainz, who was ordered to let his team-mate by.
Sainz, who had switched from softs to mediums, then fell back into the clutches of the Alpines of first Esteban Ocon, who qualified a superb sixth, and then Fernando Alonso, who had a disappointing qualifying performance in 13th but drove an excellent race with a long first stint on the medium tyre.
Alonso passed Daniel Ricciardo's McLaren shortly after they had stopped within a lap of each other, and then dispatched Sainz before closing in on Ocon in the final laps, finishing just a second behind after starting seven places behind him.
Ricciardo also passed Sainz in the closing laps to take ninth, a decent result after qualifying 16th, and the Ferrari also dropped back behind Alpha Tauri's Pierre Gasly for the final point as a frustrated Sainz battled deteriorating tyres.
Driver of the day
What happens next?
The Spanish Grand Prix next weekend - another very different circuit and the prospect of another close fight in what is turning into a vintage year.
'Tough race, physically and mentally' - what they said
Hamilton: "That was such a tough race, physically and mentally, keeping everything together. I didn't quite get as good a start as Valtteri and then lost out at the restart which was not good. I had to try and reposition myself best I could, I think Max made a mistake at some point and that was perfect. With Valtteri I had to make the move early on before the tyres were destroyed and I just managed to get him at Turn One. Right on my limit. Great race."
Verstappen: "My race was pretty decent. I had a good restart and then of course, I tried to put the pressure on Valtteri. At the end, I think we just lacked a little bit of pace but overall, Lewis got by again and once after the pit stop, the warm up is super hard on this tyres. This was an odd weekend in terms of grip. We were not on top of it here but we'll see what we can do in Barcelona."
Bottas: "I don't really know what happened in the first stint. I didn't have the pace for unknown reasons. After that the second stint was pretty good but there was some issue with a sensor or something. We've had a strong package overall today so I don't really know why in the first stint it didn't work."