Mark Webber's title chances slipped as his Red Bull teammate Sebastian Vettel ignited his campaign for a third world crown when he emerged triumphant from an incident-packed Singapore Grand Prix.
After two safety cars, crashes and the shock retirement of title-challenger Lewis Hamilton, Formula One's youngest double champion finished in front of McLaren's Jenson Button for only his second win of the season.
Championship leader Fernando Alonso was third, claiming his eighth podium finish of the season in the dramatic night race around the narrow, demanding street circuit.
With his second win of the season, Vettel (165 points) climbs to second in the standings behind the consistent Alonso, who has a reduced lead of 29 points.
But it was tough day for Webber who was hit with a 20-second penalty for an illegal overtaking manoeuvre which pushed him out of the points.
The penalty for running off the course as he overtook Sauber's Kamui Kobayashi late in the race relegated the Australian from 10th to 11th place.
Webber, the winner in Monaco and Britain, remained fifth in the standings with 132 points after 14 of the 20 races.
Kimi Raikkonen lies third and the unlucky Hamilton drops down to fourth.
"This has been one of toughest races of the year, to be honest," said Vettel, last year's winner in Singapore.
"There are so many bumps, there's no room for mistakes and it just seems to go on forever... I'm just incredibly happy.
"It's a tough championship but we are still in it, and looking forward to the next few races, and the goal is to beat Fernando."
Button was relatively pleased with second place, though disappointed with Hamilton's non-finish, which put a major dent in McLaren's bid to end a 13-year drought in the constructors' championship.
"It's good to get some points on the board after the retirement at Monza," Button said.
Alonso acknowledged that Ferrari continues to struggle for pace, and his race was one of several which were compromised by the timing of the safety-car interventions.
Hamilton made a smooth start from pole accompanied by Williams driver Pastor Maldonado, but a misjudgment on the first corner cost the Venezuelan two places as Vettel and Button sailed through.
Ferrari's Massa was the big loser in the early jostling as he dropped to the back after pitting with a puncture. At the front Hamilton and Vettel, swapping fastest laps, were peeling away from Button.
Red Bull's Webber came in for soft tyres on lap nine, setting a trend followed by the leading drivers. Meanwhile his team-mate Vettel overcame a scare at the notorious turn 10.
Hamilton pitted from the lead on lap 12 but was soon back in front, ahead of Vettel. But disaster struck on lap 23 when a gearbox failure put him out of the race, prompting gasps from the crowd.
Vettel set consecutive fastest laps as he scented his second victory in a row in Singapore, with a lead of nearly two seconds over Button heading into the final 15 laps. Alonso was seven seconds adrift in third.