Sebastian Vettel passed Valtteri Bottas late on to win a thrilling British Grand Prix in which Lewis Hamilton charged back to second after being spun round on the opening lap.
Mercedes used a safety car to get Bottas ahead of early race leader Vettel but the Ferrari driver used fresher, softer tyres to steal the victory with a superb move five laps from the end of the race.
Hamilton then passed teammate Bottas at the same spot a lap later to seal second and Kimi Raikkonen made it a hat-trick of late passes at Brooklands to demote his countryman from the podium entirely.
Hamilton dropped to the tail of the field at the start after Raikkonen locked his right-front tyre at the tight Turn 3 right-hander at Village, ran wide and clouted the Mercedes.
Raikkonen continued behind both Red Bulls but was handed a 10-second penalty, which would negate his on-track pass of Daniel Ricciardo into Copse, while Hamilton resumed in 17th.
Vettel had already assumed the lead after jumping Hamilton off the line and built a commanding lead in the first part of the opening stint, opening up a six-second gap over Bottas.
Hamilton charged back into the points by lap six and was into sixth four laps later, by which time he was already more than a pitstop behind the race leaders.
Bottas began to chip away at Vettel as the Ferrari struggled with its tyres and the lead was down to 4.8s when Vettel stopped on lap 20.
Bottas pit a lap later and Mercedes got Hamilton to release him with a cleanly-orchestrated position-swap at Brooklands the following lap, and the Finn started to nibble further into Vettel's lead.
He had brought it down to 2.4s when Marcus Ericsson lost the rear of his car when he turned into the first corner with DRS still open and flew across the gravel and nose-first into the tyres.
That triggered a safety car on lap 32 of 52 and Ferrari reacted by pitting Vettel but Mercedes told Bottas to stay out and claim track position.
Behind, Hamilton moved up to third as Max Verstappen and Raikkonen pit, with Ricciardo staying in sixth as the safety car was called just after he had made a second stop and handed track position to Raikkonen.
Bottas gunned the throttle at the end of the Hangar Straight on lap 37 and kept Vettel at bay, as Raikkonen and Verstappen engaged in a fierce fight that went the way of the Red Bull.
The race was neutralised again moments later for an accident at Copse between Carlos Sainz and Romain Grosjean, when Sainz attacked on the outside but Grosjean suffered a wobble at the apex.
Both flew off-track and into retirement, with Grosjean ending a miserable race that started with him dropping out of the points on the opening lap thanks to a collision with teammate Kevin Magnussen.
The safety car's second appearance lasted three laps, setting up an 11-lap sprint at the end.
Bottas resisted Vettel again at the restart before coming under attack from Vettel into the Brooklands left-hander at the end of the Wellington Straight three laps in row.
He held on until lap 47, when Vettel took advantage of a slight wobble from Bottas exiting The Loop onto the Wellington Straight and drafted him towards Brooklands before diving inside very late as Bottas failed to cover the inside line.
That released Vettel into a lead he would hold comfortably to the end, while Hamilton forced his way inside Bottas at Brooklands a lap later.
Raikkonen cleared Verstappen before the Dutchman retired with a long-standing brake-by-wire problem then blew past Bottas for third on the outside into Brooklands using DRS.
Bottas managed to keep Ricciardo at bay to finish fourth, with Nico Hulkenberg finished sixth for Renault after taking advantage of the messy first lap to jump five places, and he held that best-of-the-rest slot to the end.
Force India's Esteban Ocon was a quiet but excellent seventh, as Fernando Alonso bested Magnussen in a fiery late fight to finish eighth.
Pierre Gasly claimed the final point in 10th for Toro Rosso and Honda.
|5||Daniel Ricciardo||Red Bull||TAG||9.500|
|7||Esteban Ocon||Force India||Mercedes||29.930|
|10||Pierre Gasly||Toro Rosso||Honda||34.129|
|11||Sergio Perez||Force India||Mercedes||34.708|
|15||Max Verstappen||Red Bull||TAG||6 laps|
|16||Romain Grosjean||Haas||Ferrari||15 laps|
|17||Carlos Sainz||Renault||Renault||15 laps|
|18||Marcus Ericsson||Sauber||Ferrari||21 laps|
|19||Charles Leclerc||Sauber||Ferrari||34 laps|
|20||Brendon Hartley||Toro Rosso||Honda||51 laps|