Championship leader Lewis Hamilton suffered his first retirement of the year as Sebastian Vettel romped to victory in the Singapore Grand Prix.
Vettel took his third win of the year in dominant style, controlling the race from start to finish as two safety cars led to hectic action behind.
The second caution period was caused by a man wandering along the track.
Hamilton suffered a loss of power while running fourth, dropping down the field before eventually being told to retire.
His Mercedes team-mate Nico Rosberg cut Hamilton's championship lead to 41 points by finishing fourth.
There are 150 points still available in the remaining six races, starting in Japan next weekend.
Vettel, meanwhile, is now only eight points adrift of Rosberg and a real threat for second place in the championship if Ferrari can maintain this form.
Both Mercedes were incapable of challenging at the front as Daniel Ricciardo took second for Red Bull, ahead of Ferrari's Kimi Raikkonen.

Vettel turns clock back

Vettel's victory was the third of the year - meeting Ferrari's pre-season target - but it was of a completely different character to those in Malaysia and Hungary.
Both of those came about because of specific circumstances - in Malaysia because Ferrari had better tyre life than Mercedes and could do one fewer stop and in Hungary because Hamilton dropped back with errors.
This time, Vettel and Ferrari were for the first time unquestionably the fastest combination on the track - in a manner reminiscent of the German's many dominant victories for Red Bull - as Mercedes, inexplicably off the pace in qualifying, continued to struggle.
Lewis Hamilton
Hamilton retired after losing power in his Mercedes
Hamilton and Rosberg ran fifth and sixth in the opening stint, unable to keep up with the Ferraris and Red Bulls ahead.
Vettel, meanwhile, was in a league of his own, pulling out three seconds on the first lap and five by lap three, before backing off and stabilising his lead.
Ricciardo began to close in as the leaders neared their first pit stops, but these were triggered early when Nico Hulkenberg turned into Massa as the Brazilian rejoined after his own first stop.
Hulkenberg was penalised with a three-place grid drop at next weekend's Japanese Grand Prix for causing a collision.
Ricciardo got on the radio to say to his team that Vettel had "got lucky" with the timing of the safety car.
But subsequent events proved nothing could have been further from the truth.
Nico Hulkenberg
Hulkenberg was handed a three-place grid penalty after his crash with Felipe Massa
Vettel held Ricciardo's pace for several laps after the restart, apparently trying to give Raikkonen a chance to pressure the Australian for second.
But after the three cars ran nose to tail for eight laps, Vettel suddenly sprinted clear, pulling out 2.7 seconds in one lap, four seconds in three before again backing off.
From that point, it was clear the race for the lead was over and Vettel was able to calmly stroke home, despite the surreal circumstances of the second safety car intervention.
At the same time, Ricciardo was substantially quicker than Raikkonen and the top three were settled, despite late drama.

Frantic last few laps

The errant spectator and subsequent safety car period ensured there was a dramatic and incident-filled last 20 laps.
When the race was restarted, Jenson Button had hopes of salvaging some points for McLaren after the earlier retirement of team-mate Fernando Alonso from ninth place with a car failure.
Button was running in 10th place behind Lotus's Pastor Maldonado as the field tussled on the lap after the restart.
But Button broke his front wing on the back of the the Venezuelan's car as Maldonado made an unconventional tight exit from one of the corners while Button was trying to cut back to the Lotus's inside.
"I should have known, really, that he's mental," Button said with resignation to his team over the radio, in reference to Maldonado's incident-prone reputation.
Button later retired with a gearbox problem while running 14th, a desperate end to a weekend troubled McLaren-Honda started believing it would give them their best chance of points for the remainder of the year.

Controversy in the minor positions

Williams's Valtteri Bottas took fifth, ahead of Red Bull's Daniil Kvyat, who twice lost out because he made a pit stop just before the two safety cars.
Force India's Sergio Perez was seventh, fending off the Toro Rossos of Max Verstappen and Carlos Sainz.
Verstappen refused to accede to an order from his team to let Sainz by for eighth place in the final two laps.
The two novices had earlier passed Lotus's Romain Grosjean before dragging up to Perez, and the Frenchman lost his battle to do a stint of 34 laps on his tyres and score a point when he was passed by Sauber's Felipe Nasr with two laps to go.

Reaction on the podium

"One of [my best races]," said Vettel to BBC F1 chief analyst Eddie Jordan on the podium. "Pretty intense, lots of pressure from behind. Daniel had a very good race looking after his tyres very well.
"The second stint I was dictating the pace and then using that tactically and from then controlling the gap. The car had so much pace."
Ricciardo added: "I think Seb experimented a bit. The first stint, he just went and then we were coming back at him. If the first safety car had not come out it would have been pretty close.
"Then second stint he learned from that and backed it up and then went. The race pace was good - we matched Seb."