Red Bull's Max Verstappen won a wet and crazily chaotic German Grand Prix littered with crashes and safety car periods with Mercedes' Formula One leader Lewis Hamilton failing to score.
In an extraordinary race of constantly changing fortunes, multiple pitstops and endless drama, Ferrari's Sebastian Vettel started from last place and finished second in front of his home crowd.
Russian Daniil Kvyat, who became a father on Saturday, was an astonishing third to hand Red Bull's sister team Toro Rosso their second ever podium.
"It was an amazing race to win in the end, it was really tricky out there to make the right calls, and we really had to be focused," said Verstappen, who took the chequered flag 7.333 seconds ahead of Vettel.
The race was shortened by three laps after the safety car had led the field away before a standing start.
Hamilton's closest rival and team mate Valtteri Bottas, who had also led briefly, crashed out with six laps remaining to leave the gap between the two unchanged at 39 points after 11 of 21 races.
Mercedes, empty-handed in their 200th start and in what looks likely to be the last German Grand Prix for some time given the race's uncertain future, had won nine of the previous 10 races.
Verstappen, the only man to beat them, made five pitstops on his way to his second won of the season and also spun 360 degrees in the middle of the race. There were four safety car periods.
"It was a long race, at some stages it felt like it would never end and it was very tough with the conditions and I'm just happy. It was a lot of fun," said Vettel.
Hamilton, who had started on pole position with Dutch youngster Verstappen alongside on the front row, was lucky to end up 11th of 14 finishers after spinning into the barriers and smashing his front wing.
The Briton, who caught Mercedes by surprise when he pitted, also had to serve a five second time penalty.
Ferrari's Charles Leclerc was less fortunate, crashing on lap 29 while in second place and looking likely to take the lead.
Canadian Lance Stroll was fourth for Racing Point with Spaniard Carlos Sainz fifth for McLaren.
Thai driver Alexander Albon gave Toro Rosso more points in sixth place with Kimi Raikkonen seventh and Alfa Romeo team mate Antonio Giovinazzi eighth.
The two Haas cars of Romain Grosjean and Kevin Magnussen completed the scoring places.