Lewis Hamilton took victory in a sensational Formula 1 German Grand Prix while his title rival Sebastian Vettel crashed out as rain struck the Hockenheim circuit.
Vettel had led for the majority of the race from pole position, but slithered out of contention from the lead on lap 52 of the 67-lap race.
The German hit his steering wheel in frustration at the mistake of crashing into the Turn 13 barriers.
Hamilton started 14th and took advantage of the downpour that soaked the circuit in the latter stages that caught out a number of drivers – including Vettel – and which led to the safety car to be deployed.
In the chaos, there was an instant reversal of fortune as a Ferrari 1-2 became a Mercedes 1-2 during the rain shower.
All race, teams were constantly trying to second guess the conditions and most drivers stayed out on dry-weather tyres while the storm passed and the circuit began to quickly dry up.
Hamilton in particular was helped by having pitted for fresh ultrasoft tyres not long before the rain began to fall, while many of his rivals were on more used tyres.
Valtteri Bottas finished in second, but had an attempt at overtaking his teammate when the safety car period ended on lap 57.
The Finn got alongside Hamilton at the Turn 6 hairpin, but Hamilton was just able to retain the lead. Just a lap later, Bottas was instructed to hold position.
Kimi Raikkonen took third place, ahead of Max Verstappen’s Red Bull. The Dutchman had been one of those to gamble on intermediate tyres when the rain started to fall in just one section of the track.
Two laps later, Verstappen had returned back to the pits for dry tyres – the gamble failed – but then the whole circuit was doused.
Charles Leclerc and Fernando Alonso also switched to intermediate tyres, only to go back to slicks soon after, while Pierre Gasly was sent out on full wets and went into the gravel.
Nico Hulkenberg was fifth for Renault, ahead of Romain Grosjean’s Haas and the two Force Indias of Sergio Perez and Esteban Ocon.
Sauber’s Marcus Ericsson and Toro Rosso driver Brendon Hartley both benefitted from the chaotic conditions to scoop the final point-finishing positions, the latter after Carlos Sainz was handed a 10s penalty.
At the start, Vettel led away from Bottas, Raikkonen and Verstappen and was comfortably in control of his home race. By lap 25, Vettel held a five-second lead over Bottas when he came in to pit from ultrasofts to softs.
His Ferrari teammate Raikkonen was the first of the frontrunners to pit on lap 14 and once the first stops were over, the Finn held a slim lead over Vettel.
But the German was on tyres that were 11 laps fresher and Raikkonen was instructed by engineering director Jock Clear to led Vettel past.
Hamilton started on the soft tyre and made swift progress in the early laps to make his way through the field. After starting 14th, he was up to seventh by lap eight.
Daniel Ricciardo stopped after 27 laps due to a loss of power in the second Red Bull, having made his way up from the back of the grid to sixth in the early stages.
Both Williams drivers also failed to finish, Lance Stroll and Sergey Sirotkin stopping within two laps of each other in the closing stages.