Lewis Hamilton won a chaotic Brazilian Grand Prix which was red-flagged twice due to treacherous weather conditions in Sao Paulo.
The race got underway after seven laps under the safety car, with Max Verstappen immediately passing Kimi Raikkonen for third place.
Although the track remained damp, nearly a fourth of the field pitted for intermediate tyres, including the Sauber of Marcus Ericsson.
The move backfired, with the Swede aquaplaning and stopping at the entrance of the pitlane. Due to the severity of the situation, the safety car was deployed once again, with pitlane entry blocked for safety reasons.
When the resumed after several more laps under the SC, Kimi Raikkonen immediately crashed on the start/finish straight, inflicting a lengthy red flag period.
Although the race resumed briefly, it was red flagged again after the conditions failed to improve.
When the race finally got going, Verstappen hauled in Rosberg, while Vettel charged inside the top 10 from the rear of the field.
The next safety car was deployed when Massa lost control of his Williams in the run up to the start/finish straight, parking his car at the pit entry in similar fashion to Ericsson.
Massa was treated to a standing ovation from Williams as well as his former team Ferrari, a touching send-off for the Brazilian who will retire at the end of the year.
Under the safety car, Ricciardo and Verstappen pitted again to revert to wet compound, having made an ill-advised choice to switch to inters earlier in the race.
Although giving up track conditions seemed like the wrong move at first, both the Red Bull drivers stormed through the field.
Verstappen, was particularly inspiring, the Dutchman fighting back to take the final spot on the podium.
At the front, Hamilton took a controlled win from Nico Rosberg to keep the championship fight alive heading into the final race of the year.
Sergio Perez finished fourth for Force India, losing the final rostrum shot with just two laps to go.
Vettel was eventually classifying fifth, while Sainz managed to hold off Nico Hulkenberg and a recovering Ricciardo to take sixth.
Hulkenberg was running in fourth place in the first half of the race, but an unfortunate puncture ruled out any chance of a maiden podium finish.
Felipe Nasr brought home two crucial points for Sauber, placing them ahead of Manor in the constructors championship.
Fernando Alonso occupied the final point with 10th, despite spinning out in the last sector that also caught out a number of drivers.
by Rachit Thukral