Sebastian Vettel extended his advantage in the drivers' standings to 14 points by clinging on to victory despite steering issues in a dramatic end to the Hungarian Grand Prix.
It looked like a mechanical problem could prove costly again for the German, whose championship lead was cut to just one point following a late puncture and victory for Lewis Hamilton last time out at Silverstone.
However, Vettel managed to stay clear of Ferrari team-mate Kimi Raikkonen to top the podium on his 50th start for the Italian constructor, despite the Finn repeatedly hinting over team radio he felt he should have been let through due to his superior pace.
With Valtteri Bottas failing to attack the Ferrari duo he was ordered to allow Hamilton past, but the Brit fared no better and, in a show of remarkable grace, slowed down on the final lap to allow his team-mate back into third.
Four-time world champion Vettel consequently takes a more comfortable cushion into the mid-season break, but his win is largely owed to Raikkonen for refusing to attack him and helping keep the two Mercedes at bay.
Max Verstappen was out of the running after receiving a 10-second penalty for causing a first-lap collision with team-mate Daniel Ricciardo.
That ended Ricciardo's race and brought out the safety car, with the Australian unable to hide his frustration with Verstappen, who could only manage fifth.
It was a positive day for Fernando Alonso, though, who guided his McLaren to sixth - his best finish in 2017.
TEAM ORDERS BREED DIFFERENT RESULTS
Vettel got away well but started to lose time as he had to keep his steering wheel down on the left to maintain a straight line and he started losing time to Raikkonen.
Ferrari simply told him to keep up with Vettel and, as Bottas and Hamilton closed in the Finn, said over team radio: "You've put me under a massive threat from Mercedes for no reason."
Hamilton suffered intermittent losses of communication with Mercedes but made sure they were aware he wished to pass Bottas when links were restored, and they duly obliged.
However, the Brit was unable to make an attack stick and had to keep backing off, letting his team-mate back through in a move that cost him three points.
RED BULL RIVALRY
Having led the way in FP1 and FP2 on Friday it looked set to be a promising weekend for Ricciardo, but it ended up finishing in massive disappointment.
As Ricciardo went around the outside of Verstappen into turn two, the Dutchman locked up and collided with his team-mate, who managed one more turn before leaking liquid on the track and spinning out.
It resulted in the maiden first-lap retirement of the Australian's F1 career, with Verstappen - who he deemed a "f****** sore loser" over team radio - handed a 10-second penalty by the race stewards for causing a collision.
DI RESTA RETIREMENT
A late replacement for the unwell Felipe Massa, Paul Di Resta – initially in Hungary as part of Sky Sports' coverage – drew plaudits for out-qualifying Marcus Ericsson in his first time on the track in the hybrid Williams.
Kimi Raikkonen was not impressed as he tried to lap him on the home straight and said: "Who the f*** is this Williams guy? He should stick to the reporting."
Di Resta was unable to make it to the chequered flag due to an oil leak.
TIDE TURNING FOR MCLAREN?
The first half of the season was woeful for McLaren, who were bottom of the constructors' championship with just two points from a ninth-place finish in Azerbaijan for Alonso, who celebrated his 36th birthday on Saturday.
Their best performance of the season saw Alonso, who also set the fastest lap, gain eight points to move above Sauber, with Stoffel Vandoorne earning his first point of the season in 10th.
Engine suppliers Honda will be rubbing their hands together too having confirmed they are in customer talks with a number of teams after Sauber pulled out of a relationship due to start next season.
IN THE POINTS
1. Sebastian Vettel (Ferrari)
2. Kimi Raikkonen (Ferrari) +0.908 seconds
3. Valtteri Bottas (Mercedes) +12.462s
4. Lewis Hamilton (Mercedes) +12.885s
5. Max Verstappen (Red Bull) +13.276s
6. Fernando Alonso (McLaren) +71.223s
7. Carlos Sainz (Toro Rosso) +1 lap
8. Sergio Perez (Force India) +1 lap
9. Esteban Ocon (Force India) +1 lap
10. Stoffel Vandoorne (McLaren) +1 lap
1. Sebastian Vettel (Ferrari) - 202
2. Lewis Hamilton (Mercedes) - 188 (-14)
3. Valtteri Bottas (Mercedes) - 169 (-33)
4. Daniel Ricciardo (Red Bull) - 117 (-85)
5. Kimi Raikkonen (Ferrari) - 116 (-86)
1. Mercedes - 357
2. Ferrari – 318 (-39)
3. Red Bull – 184 (-173)
4. Force India – 101 (-256)
5. Williams – 41 (-316)
After a mid-season break that is likely to be welcomed by the drivers, the action returns in four weeks at the iconic Spa-Francorchamps for the Belgian Grand Prix.