Fernando Alonso came from 15th on the grid to take Renault's first victory in two years as an early safety car turned the inaugural Singapore Grand Prix inside out.
The former world champion had pitted before the interruption, so was able to vault to the front as others stopped during the yellow.
Nico Rosberg recovered from a penalty to take a remarkable second for Williams, with Lewis Hamilton extending his championship lead in third place as Felipe Massa finished outside the points after a dramatic pitstop incident.
Alonso languished in the midfield at the start following his qualifying failure, as Massa (Ferrari) gradually edged away from Hamilton up front. The two leaders initially left Massa's teammate Kimi Raikkonen behind, but as the first stint went on, the world champion found more pace and set several fastest laps as he gained on Hamilton.
In their wake, Robert Kubica (BMW) and Heikki Kovalainen (McLaren) banged wheels at the start, allowing Sebastian Vettel (Toro Rosso) and Timo Glock (Toyota) to get between them.
But all the early activity was rendered irrelevant when Nelson Piquet had a heavy crash in his Renault on lap 14, prompting a safety car.
This was ideal timing for his teammate Alonso, who had opted for an aggressive strategy and had pitted for the first time on lap 12, when only 11th.
Red Bull's David Coulthard and Mark Webber, and Honda's Rubens Barrichello all managed to dive in just before the pits were closed, although Webber and Barrichello couldn't take advantage as both suffered mechanical failures shortly afterwards.
But the safety car appeared disastrous for Rosberg and Kubica, who were running low on fuel and had no choice but to stop in the closed pits, inevitably incurring penalties. Rosberg at least took his stop sooner than Kubica, emerging further up the safety car queue - which would later prove crucial.
Massa was able to wait until the pits were open before stopping, only to pull away with his fuel rig still attached when Ferrari's semi-automatic system appeared to give him a premature green light.
The Ferrari wrenched the fuel hose from the rig, with one mechanic requiring a precautionary trip to the medical centre, and Massa then had to wait at the pit exit while his crew ran down to detach the hose. He would also incur a drive-through penalty for being released into the path of Adrian Sutil during the chaos, leaving the pole-sitter at the tail of the field.
Rosberg emerged at the front of the queue ready for the restart, followed by one-stoppers Jarno Trulli (Toyota) and Giancarlo Fisichella (Force India), both yet to pit, then Kubica, the well-placed Alonso, the Red Bulls and Hamilton.
The officials then took five laps to deliberate Rosberg's penalty, allowing the Williams to charge away from the field as Trulli and particularly Fisichella delayed the rest of the pack.
Rosberg was therefore able to establish a sufficient lead to rejoin just ahead of the battling Coulthard and Hamilton, having effectively neutralised his penalty.
When Trulli and Fisichella eventually pitted, Alonso found himself in the lead of the race, and duly edged away from Rosberg, who in turn left Coulthard and Hamilton in his wake.
The McLaren finally passed Coulthard just before their final pitstops, the Red Bull having lost momentum as Alonso rejoined ahead of them following his own last stop. Coulthard then lost time and places at his stop when he pulled away prematurely.
That left Alonso with a comfortable 14-second advantage over Rosberg, and 25 seconds clear of Hamilton, until the safety car was called again on lap 50 when Sutil crashed having seemingly been distracted by Massa having a quick spin ahead of him.
This brought the pack right back onto Alonso's tail, but the Renault driver shrugged this off and stormed away at the restart - re-establishing a six-second lead in just two laps.
Rosberg was able to resist Hamilton to take a career-best second, while the result extended Hamilton's championship lead back up to seven points.
Glock finished fourth, with Raikkonen using a very long middle stint to move back up to fifth after having to queue behind Massa at their first stops. The reigning champion's miserable season took another unhappy turn though when he ran wide and crashed out with only three laps to go.
Vettel was consequently elevated to fifth, having lost a place to Glock when he ran wide at the first restart.
Nick Heidfeld (BMW), Coulthard, and Williams' Kazuki Nakajima completed the points scorers ahead of Honda's Jenson Button.
Kovalainen also lost time queuing behind Hamilton in the first safety car pitstops, and making an early second pit visit failed to pay off, leaving him 10th, ahead of Kubica, who couldn't emulate Rosberg's pre-penalty charge as he was stuck behind Fisichella.
What had seemed such a promising afternoon for Massa ended in a lowly 13th place between Sebastien Bourdais' Toro Rosso and Fisichella, who lacked the speed after his pitstop to capitalise on his brief period in the top three, while Trulli retired from a likely fifth position with a late gearbox failure.
PROVISIONAL RACE RESULTS
The Singapore Grand Prix
61 laps; 309.087km;
Pos Driver Team Time
1. Alonso Renault (B) 1h57:16.304
2. Rosberg Williams-Toyota (B) + 2.957
3. Hamilton McLaren-Mercedes (B) + 5.917
4. Glock Toyota (B) + 8.155
5. Vettel Toro Rosso-Ferrari (B) + 10.268
6. Heidfeld BMW Sauber (B) + 11.101
7. Coulthard Red Bull-Renault (B) + 16.387
8. Nakajima Williams-Toyota (B) + 18.489
9. Button Honda (B) + 19.885
10. Kovalainen McLaren-Mercedes (B) + 26.902
11. Kubica BMW Sauber (B) + 27.975
12. Bourdais Toro Rosso-Ferrari (B) + 29.432
13. Massa Ferrari (B) + 35.170
14. Fisichella Force India-Ferrari (B) + 43.571
15. Raikkonen Ferrari (B) + 4 laps
Fastest lap: Raikkonen, 1:45.599
Driver Team On lap
Trulli Toyota (B) 51
Sutil Force India-Ferrari (B) 50
Webber Red Bull-Renault (B) 30
Barrichello Honda (B) 15
Piquet Renault (B) 14
World Championship standings, round 15:
1. Hamilton 84 1. McLaren-Mercedes 135
2. Massa 77 2. Ferrari 134
3. Kubica 64 3. BMW Sauber 120
4. Raikkonen 57 4. Renault 51
5. Heidfeld 56 5. Toyota 46
6. Kovalainen 51 6. Toro Rosso-Ferrari 31
7. Alonso 38 7. Red Bull-Renault 28
8. Vettel 27 8. Williams-Toyota 26
9. Trulli 26 9. Honda 14
10. Glock 20
11. Webber 20
12. Rosberg 17
13. Piquet 13
14. Barrichello 11
15. Nakajima 9
16. Coulthard 8
17. Bourdais 4
18. Button 3
All timing unofficial