Lewis Hamilton cut his championship deficit to Sebastian Vettel to just seven points with a closely fought victory in the Belgian Grand Prix.
Hamilton rarely led Vettel by more than two seconds in a tense battle until a late safety car added further jeopardy.
As all the drivers pitted, Ferrari put the fastest ultra-soft tyres on Vettel while Mercedes put Hamilton on softs.
But after fending off an attack by the German on the restart, Hamilton took back control and led to the flag.
A tense afternoon
Hamilton had not been happy with the decision to bring out the safety car, after a collision between the two Force India drivers on the run down the hill from La Source to Eau Rouge.
He said it was "a BS call from the stewards", clearly worried that with the extra grip from the ultra-soft tyres, Vettel would have an advantage.
For a few seconds after the restart, Hamilton appeared to be in trouble, as Vettel sat right behind him through Eau Rouge and appeared to be lining up to pass the Mercedes up the long Kemmel straight.
But Hamilton - taking part in his 200th race - used all the power advantage of his Mercedes to fend him off and he reeled off two consecutive fastest laps to pull 1.4 seconds clear and give himself a more comfortable margin.
The race settled back into the pattern that had been set soon after the start.
Hamilton was in front, Vettel was more than capable of staying right with him, but in evenly matched cars could not get close enough to attack.
Small twists of fate
In many ways, the race was a microcosm of the season.
The Mercedes and Ferrari have very different characteristics, excelling in different parts of individual circuits and the advantage swinging one way or another from race to race.
But so tight is the performance between them in general that victories hinge on small twists of fate or tiny details.
In this case, Mercedes' advantage with their extra engine boost in qualifying, allied to a stellar lap from Hamilton, put the the Englishman on pole. Vettel, equally impressive in qualifying, could manage only second.
On the first lap, just as after the restart, Vettel challenged out of Eau Rouge and towards Les Combes, but Hamilton fended him off, laying the foundations for a crucial win.
Hamilton becomes the first man to win five races this season, with Vettel on four.
Had the Ferrari driver won, Hamilton would have slipped to 21 points adrift, and with Singapore, where Mercedes expect the red cars to dominate, just two races away, it could have been a tough ask to close that.
But now with seven points in it, and Monza next weekend, another race Hamilton has a strong chance to win, the fight remains as finely poised as ever.
Bottas now out of the picture?
The race also further underlined the impression of this being a two-horse race.
Hamilton's team-mate Valtteri Bottas was only 19 points behind him before it, but the Finn finished fifth and slipped to 34 points behind and 41 off the lead.
Bottas had been cruising to third but was passed on either side by Red Bull's Daniel Ricciardo and Ferrari's Kimi Raikkonen at the restart after the safety car and could not make up the ground he lost by running wide at Les Combes as they swept on either side of him.
Raikkonen recovered well after a 10-second stop-go penalty for not slowing for yellow caution flags, while Ricciardo's podium was some consolation for Red Bull after yet another retirement for his team-mate Max Verstappen.
The Dutchman managed only eight laps before his Renault engine failed, sending him into retirement for the sixth time in 12 races.
Civil war at Force India
There will recriminations at Force India after the crash between their two cars on lap 28, not the first time Sergio Perez and Esteban Ocon have crossed swords this season.
Ocon was trying to pass Perez and had a run on him out of La Source, but as he closed on the Mexican down the hill, Perez squeezed the Frenchman towards the inside wall
The two cars touched, Ocon's front wing being damaged and Perez suffering a puncture.
The incident followed Ocon questioning why Perez had been allowed to pit first, against convention, a few laps beforehand, despite Ocon being ahead.
The two had had a close call at Les Combes on the previous lap - as well as banging wheels at the starts of the race - before the controversial incident at the start of the next lap.
The two cars collided in Baku four races ago, where Ocon was arguably more at fault. This time it was more at Perez's instigation.
But the bosses will be more concerned about their drivers' magnetic attraction for each other costing them points. They were both warned after Baku that collisions were unacceptable for exactly that reason and the partnership is looking increasingly untenable.
Driver of the day - Lewis Hamilton
F1 moves on quickly to another historic track at Monza in Italy next weekend. Hamilton could do with another win to consolidate his position before the seemingly inevitable Vettel victory that is coming at Singapore two weeks after that.
What they said
"It has been a strong weekend for myself and the team," said Hamilton. "Really grateful for all the hard work.
"Vettel did a great race, he was very consistently throughout and it was fun to be racing against Sebastian at his best and the car at his best, we were within half a tenth every lap and that is what racing is about.
"They were able to keep up so I think they had better pace but fortunately I was just about able to stay ahead."
Vettel said: "It was good fun, it was really intense. I was waiting for him to make a mistake, he didn't.
"He was waiting for me to, I didn't. The restart is maybe why I am not entirely happy. I was on the outside and nowhere to go. We had good pace compared to Silverstone - I'm looking forward to our home race."