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.
BECOME A WRITER
Do you have what it takes? Sign up today and send over your 250 word test article: http://gms.to/haveyoursay3
Article continues below
Nico Rosberg, Hamilton's closest rival in his quest for back-to-back titles, crossed the line in fourth.
Vettel, started from pole position after his qualifying masterclass on Saturday, and his win rarely looked in doubt.
Article continues below
Indeed it was the Vettel of old - the driver who sauntered to nine straight victories in 2013 and four consecutive championships while competing for Red Bull - who led every lap of a race which lasted over two hours.
For Hamilton it was his first retirement since last year's Belgian Grand Prix. The world champion bemoaned a lack of power shortly before the midway stage and was forced to park his car on lap 33.
It could have been worse for Hamilton, but with Mercedes bizarrely out of sorts at this testing street circuit, Rosberg could manage only fourth. With six races remaining he holds a 41-point lead over Rosberg with Vettel now just eight points further back.
Vettel burst out of the blocks and was three seconds clear of Ricciardo by the end of lap one.
Raikkonen was next up with Daniil Kvyat in fourth and Hamilton and Rosberg running line astern in fifth and sixth.
With Vettel comfortable at the front, Formula One's only night race was turning into a rather processional affair.
However, that was to change on lap 16 when the safety car was deployed after Nico Hulkenberg and Felipe Massa collided at turn one.
Hulkenberg, who will serve a three-place grid penalty at the next race as punishment for the incident, retired, with Massa also unable to make it to the finish line.
The safety car pitted three laps later ,and while the top three of Vettel, Ricciardo and Raikkonen were separated by only 1.5 seconds, the German appeared to have the race in control.
Indeed Hamilton, now up to fourth after Kvyat fell behind both Mercedes drivers at the first round of pit-stops, suggested the former Red Bull driver was deliberately backing Ricciardo up into team-mate Raikkonen's clutches.
Such emotion then boiled down to Hamilton, aiming to go 78 points adrift at the top of the standings with only six races left of the season to go, encountering a pivotal setback.
So close, yet so far
The 30 year old, who had been bidding to match Ayrton Senna's tally of 41 wins from 161 starts here, reported a sudden loss of engine power. He slid down the field, losing place after place.
The Stevenage-born driver desperately urged his Mercedes pit crew to resolve the problem, but a solution was not forthcoming.
This resulted with the energetic-driver exiting via the sidetrack on lap 33, with a space being cleared in the Mercedes garage.
"I was feeling super optimistic," Hamilton said. "I was on the prime tyres and the three cars in front were on the options but I was easily keeping up with them and thinking 'we have a race on our hands'.
"They were telling me to change all these things and then I was overtaken by two Manors so I knew l was last. When they started to pull away, I knew it was over."
Moments after Hamilton's retirement the safety car was back out for a second time, the 12th occasion in eight Singapore races, after a spectator had managed to enter the track.
Houston, we have a man on the track
"There is a fan on the track," shouted Vettel on the team radio. The man casually wandered alongside the speeding cars before voluntarily jumping back over the barrier. The incredible incident will call into question the security at this unique street circuit.
When the racing resumed, Jenson Button collided with the Lotus of Pastor Maldonado as the pair diced for 10th place.
"I should have known he was mental," the 2009 world champion said over the team radio after losing part of his front wing in the incident with the error-prone Lotus driver.
Button, was later forced to retire, and after Fernando Alonso parked his McLaren earlier in the race it meant the British team, who had been hopeful of a strong weekend, racked up yet another double retirement - their fourth of a dire campaign.
Elsewhere, Max Verstappen turned in a brilliant drive to fight back from last - after he stalled his Toro Rosso on the grid - to finish eighth.
Valtteri Bottas was fifth for Williams, Kvyat sixth, the Force India of Sergio Perez seventh ahead of Verstappen, with Carlos Sainz and the Sauber of Marcus Ericsson completing the points places.
Will Hamilton bounce back from this disappointing set-back? Give YOUR opinion in the comment box below