For a brief moment, Lewis Hamilton feared he had lost the Belgian Grand Prix on Sunday.
Sebastian Vettel, on quicker tires with about 10 laps to go, drove up right alongside him on a long straight, and Hamilton thought ''this might be it.''
But the British driver fended off his rival heading into the corner.
''It worked out perfect. It was great to go into Turn 5 having just done enough,'' Hamilton said. ''He was able to get way too close. It was only just enough to stay ahead.''
After that, Vettel never got another chance to pass Hamilton and conceded some ground in the title race.
Hamilton's third Spa win helped him trim championship leader Vettel's advantage over him to seven points, with eight races left in what is shaping up to be a nail-biting finish.
Hamilton's fifth win this season was his 58th overall, having equaled Michael Schumacher's pole position record of 68 in Saturday's qualifying.
Vettel finished about 2 seconds behind Hamilton.
''I was waiting for Lewis to make a mistake and he didn't,'' the German driver said. ''I'm not entirely happy.''
The track was more suited to Mercedes than Ferrari, and Hamilton said improvement can still be made.
''This weekend we definitely didn't have the race pace. The car is not quite where we need it,'' said Hamilton, who was competing in his 200th GP. ''It was only just enough to stay ahead.''
Four-time F1 champion Vettel has 220 points to three-time champion Hamilton's 213 heading into next weekend's Italian GP in Monza.
''The positive thing is that we had really good race pace,'' Vettel said.
Red Bull's Daniel Ricciardo finished third - for his sixth podium of the season - ahead of Ferrari's Kimi Raikkonen, with Hamilton's teammate Valtteri Bottas fifth.
Ricciardo showed great race intelligence and opportunism to pass Bottas after the safety car came out 10 laps from the end.
Hamilton made a good start to the race on the long climb up to Eau Rouge, but Max Verstappen's hopes ended on lap 8 when his Red Bull lost power.
''I can't believe this,'' Verstappen said. His exasperation was understandable - it is the sixth time this season he has failed to finish the race, and some 80,000 Dutch fans had crossed the border to cheer him on.
''I'm not happy at all,'' Verstappen said. ''I am very disappointed for the fans who buy an expensive ticket to watch.''
The 19-year-old Verstappen secured a podium with third place in China but has been hit with reliability issues since.
Two-time F1 champion Fernando Alonso retired on lap 27 in the latest setback as McLaren continues to struggle with Honda engines. The Spanish driver has completed only three races so far.
The Spa track, nestled in the Ardennes forest, is the longest in F1 at 7 kilometers (4.3 miles) and the race is often full of incident.
There was one heated clash between Force India drivers Sergio Perez and Esteban Ocon, prompting the safety car to come out after they made contact with each other on lap 30, sending debris onto the track.
Their tense relationship is degrading fast.
After bumping on the track at the Azerbaijan GP in June, they did it again when they touched wheels as Ocon moved on the outside of the track shortly after the start, with Perez responding by squeezing the Frenchman against the barrier.
Later the pair came into contact again with Ocon's front wing flying away and a tire dropping off Perez's car as a result.
This prompted a furious, expletive-laced outburst from Ocon.
After both cars pitted for repairs, Ocon finished ninth but Perez had to retire just before the end.
The safety car stayed out for four laps, which was too long for Hamilton's liking, and he used an expletive of his own to complain.
''There was hardly any debris about,'' Hamilton said afterward.
Drivers worry that their tires lose heat if they stay behind the car too long.
But Vettel failed to capitalize.
''Maybe that was the problem, my restart was too good,'' Vettel said. ''I was too close.''
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO_Sports and on Facebook at AhramOnlineSports.)