Ferrari's Sebastian Vettel took a surprise win in a chaotic, dramatic and thrilling Hungarian Grand Prix as Lewis Hamilton finished sixth.
Hamilton had a mighty let-off after an error-strewn drive because title rival and Mercedes team-mate Nico Rosberg finished eighth after a late puncture.
The result means Hamilton, in the most unlikely circumstances extends his lead over Rosberg to 22 points.
Red Bull's Daniil Kvyat took his first career podium in second.
Vettel's victory came as a huge surprise, and the German dedicated it to former Marussia driver Jules Bianchi, who died last Friday and whose funeral Vettel was one of many active F1 drivers to attend on Tuesday.
A minute's silence was held for the Frenchman on the grid before the race and his family attended the event.
Vettel said in French over the radio on his slowing down lap: "Merci, Jules. Cette victoire est pour toi." [Thank you, Jules. This victory is for you].
He added in English: "You will always be in our hearts. We know sooner or later you would have been in this team."
There was a further surprise as Russian Kvyat finished on the podium despite being one of several drivers to suffer penalties as a result of driving transgressions.
He held on ahead of team-mate Daniel Ricciardo despite a 10-second penalty for taking an advantage by going over track limits.
Ricciardo was involved in the incident that dropped Rosberg from second with four laps to go to the finish.
Ricciardo dived for the inside at Turn One, ran wide and Rosberg's trajectory on the inside of the corner took his left rear tyre into contact with Ricciardo's front wing, puncturing it.
Behind Ricciardo, 17-year-old Max Verstappen took the best result of his short career in fourth, ahead of Fernando Alonso in fifth - by far the best result of McLaren-Honda's dismal season so far.
The events that led to Vettel's 41st victory - a number that matches the tally achieved by three-time champion Ayrton Senna - were extraordinary and easily the most exciting race of the season so far.
More to follow
Sebastian Vettel celebrates with Red Bull drivers, Daniel Ricciardo and Daniil Kvyat
The drivers unite in memory of the late Jules Bianchi
Tributes to Jules Bianchi from fans in Hungary