Cape Town - Daniel Ricciardo made the most of Mercedes' misfortunes to win the Malaysian GP ahead of Max Verstappen while Lewis Hamilton recorded a DNF and Nico Rosberg was involved in a first lap collision.
A confusing start as the lights were slow to work led to a chaotic run into the first corner where Rosberg and Sebastian Vettel made contact as the Ferrari driver battled with Verstappen for position.
Rosberg was pitched into a spin, Vettel was taken out of the grand prix and Verstappen declared: "Sebastian is crazy!" The Virtual Safety Car was shown as Hamilton led the race ahead of Ricciardo and Sergio Perez.
On the restart Hamilton pulled away from Ricciardo, Verstappen took third off Perez, and Rosberg was down in 16th place.
With the championship leader seemingly out of the running for the victory it appeared as if it would be a straight run to the chequered flag for Hamilton. Red Bull had other ideas.
The decision to pit Verstappen under the first VSC saw the Dutchman take the lead, however, a swap from soft to hards for Hamilton opened the door to a one-stop strategy.
That looked to be paying dividends for the Mercedes driver who pulled 22 seconds clear of the feuding Red Bull team-mates only for his Mercedes engine to expire in flames on lap 40.
Red Bull pitted their drivers under the Virtual Safety Car with Ricciardo emerging two seconds clear of Verstappen.
Rosberg was third, but news broke that he had a 10-second time penalty for causing an earlier collision with Kimi Raikkonen as they traded paint while tussling for position.
On the restart Ricciardo had to face traffic, which allowed Verstappen to close up a bit. He continued to edge closer, 1.5s behind with five to go.
The Aussie held on for the victory, his first of this season, by X seconds ahead of Verstappen.
Rosberg was third as, even with his penalty, he crossed the line 10 seconds ahead of Raikkonen. Rosberg now leads the title race by 23 points.
Valtteri Bottas had a good race for Williams, finishing in fifth place ahead of Perez, Fernando Alonso and Nico Hulkenberg.
Jenson Button and Jolyon Palmer completed the points, Palmer's first of his F1 career.
Felipe Massa lost his top-ten starting position when he was unable to leave the gird for the formation lap. "The throttle is not working," he reported.
Massa started from the pit lane but was soon back in the pits for a puncture. He finished P13.
Esteban Ocon was caught twice for speeding in the pit lane, incurring five-second penalties for both incidents. He was 16th.
Romain Grosjean spun out on lap 8 when he lost it under braking into the gravel at the final corner. It as a double DNF for Haas as Esteban Gutierrez lost his front left tyre.
Kevin Magnussen joined them in retirement on lap 17 after he was told to park his Renault due to lap 1 damage, the result of a hit from behind from Daniil Kvyat. Nasr also retired, pulling his Sauber into the pits.
1 Daniel Ricciardo Red Bull 1:37.12.776
2 Max Verstappen Red Bull 2.443
3 Nico Rosberg Mercedes 25.516
4 Kimi Raikkonen Ferrari 28.785
5 Valtteri Bottas Williams 61.582
6 Sergio Perez Force India 63.794
7 Fernando Alonso McLaren 65.205
8 Nico Hulkenberg Force India 74.062
9 Jenson Button McLaren 81.816
10 Jolyon Palmer Renault 95.466
11 Carlos Sainz Jr Toro Rosso 98.878
12 Marcus Ericsson Sauber 1 lap
13 Felipe Massa Williams 1 lap
14 Daniil Kvyat Toro Rosso 1 lap
15 Pascal Wehrlein Manor 1 lap
16 Esteban Ocon Manor 1 lap
Did not finish
Felipe Nasr Sauber
Lewis Hamilton Mercedes
Esteban Gutierrez Haas
Kevin Magnussen Renault
Romain Grosjean Haas
Sebastian Vettel Ferrari