Sebastian Vettel had to contend with a crazed track invader and two safety cars before claiming his third victory of the season at an incident-packed Singapore Grand Prix.
The Ferrari driver slashed the gap to Lewis Hamilton in the championship after the Briton suffered his first retirement of the year.
Red Bull's Daniel Ricciardo finished second with Ferrari's Kimi Raikkonen completing the podium places. Nico Rosberg, Hamilton's closest rival in his quest for back-to-back titles, crossed the line in fourth.
Sebastian Vettel dedicated his victory to Jules Bianchi after winning a thrilling Hungarian Grand Prix.
In a race which had it all, the Ferrari driver finished ahead of Daniil Kvyat with the Russian's Red Bull team-mate Daniel Ricciardo completing the podium. Pole-sitter Lewis Hamilton endured an error-prone race as he crossed the line in sixth.
But there was some joy for the Briton after his Mercedes team-mate and rival for this year's championship Nico Rosberg could manage only eighth following a collision with Ricciardo in the closing stages.
Ferrari's Sebastian Vettel has won the Hungarian Grand Prix ahead of Red Bull drivers Daniil Kvyat and Daniel Ricciardo.
Lewis Hamilton, who started the day in pole position, crossed the line 6th fastest in what proved a day of damage limitation for the reigning champion.
Sebastian Vettel again came home faster than the Mercedes in a rain-affected final practice ahead of qualifying for the Austrian Grand Prix.
The four-time world champion put his Ferrari at the top of the timesheet on Friday afternoon and repeated the feat on Saturday morning, with a downpour over the Red Bull Ring effectively cutting the hour-long session in half.
The session had been red-flagged as Fernando Alonso's stricken McLaren was cleared from the pit straight and by the time it was returned to the garage the rain put pay to any further dry runs.
Lewis Hamilton got to within 0.017 seconds of Vettel's best effort, with the German the only driver to dip below the 70-second mark as he recorded a lap of one minute 09.994 seconds.
Ferrari team principal Maurizio Arrivabene does not believe the team can challenge Mercedes for the championship this yearRead the full story ›
Ferrari are back as Sebastian Vettel ended the famous marque's 34-race drought without a victory in Malaysia.Read the full story ›
Sebastian Vettel took the win in Malaysia, with Lewis Hamilton finishing second.
Sebastian Vettel has knocked back an invitation from Nico Rosberg to visit the Mercedes garage this weekend, fearing a PR stunt.
Rosberg and Vettel became involved in a spat during the post-Australian Grand Prix press conference which resulted in the Ferrari driver suggesting Mercedes should open up their garage at the Sepang International Circuit for an inspection of their cars in the wake of a dominant display at Melbourne's Albert Park.
Rosberg then invited Vettel, with the latter suggesting the debrief in the engineers' room for his visit.
Vettel has now knocked back any chance of a visit: "When I was joking with Nico in the press conference the deal was the invite was for all the paddock. Now it seems the invite has shrunk to just me.
"Initially I think it was called off by Niki (Lauda, Mercedes non-executive director) and Toto (Wolff, Mercedes motorsport boss).
"Now they've told (Rosberg) yes, so I think they are using it as a bit more of a PR thing rather than a proper invite, so the answer is no I won't be going."
Nico Rosberg has offered Sebastian Vettel an invite to the Mercedes garage at the next race in MalaysiaRead the full story ›
Sebastian Vettel has finally been confirmed as a Ferrari driver, with the four-times Formula One world champion joining the team on a three-year contract.
The German will replace Fernando Alonso, with the Spaniard expecting to sign a deal at former team McLaren.