Lotus's Kimi Raikkonen won the Abu Dhabi Grand Prix as Sebastian Vettel held on to his championship lead despite starting from the pit lane.
Raikkonen inherited the lead when Lewis Hamilton's McLaren retired.
Vettel fought back up through the field, benefited from a safety car period that wiped out early errors, to finish third behind title rival Fernando Alonso's Ferrari.
Alonso has narrowed Vettel's lead to 10 points with two races to go.
In a thrilling, nail-biting, incident-packed race that belied the Yas Marina track's reputation, Hamilton initially looked set to take a dominant win.
The McLaren driver led away from pole and, apart from a brief scare when he made a mistake while struggling to warm up his tyres in the early laps and had to fight off an attack from Raikkonen, appeared in control.
Hamilton was in the region of half a second a lap quicker than Raikkonen behind him when his car ground to a halt on lap 20 of 55. The problem was later found to be a fuel-pump failure, continuing a dismal run of reliability from McLaren in recent races.
That left Raikkonen in the lead, and he appeared in control, edging away from Alonso, who had passed Williams's Pastor Maldonado to take second place on the lap Hamilton retired.
"I'm happy but nothing to jump around about," said Raikkonen. "For sure we have a good party today and after a long night we will remember why we feel like that.
"I hope this can turn around the tables and give us many more wins if not this year then next year."
Meanwhile, Vettel had been working his way through the field after starting from the pit lane following his disqualification from qualifying for not having enough fuel in his car to provide a sample.
The German damaged his front wing in a collision with Williams's Bruno Senna but that barely impeded his progress through the backmarkers.
However, the safety car was then deployed following a frightening crash in which Nico Rosberg's Mercedes was launched over the back of Narain Karthikeyan's HRT.
In the queue behind the safety car, Vettel misjudged the pace of Daniel Ricciardo's Toro Rosso in front of him, had to take avoiding action and smashed into a trackside marker board.
The impact wrecked his front wing but actually worked to his advantage, as it forced the German into the pits for a new wing and he put on a new set of fresh tyres.
He made superb use of these in the next few laps, climbing through the field, making passes and benefiting from some lurid incidents between other drivers in front of him to climb up to seventh place by the time the leaders started to make their pit stops for fresh tyres.
Those stops promoted Vettel to second place behind Raikkonen and Lotus believed Red Bull might be trying to get to the end of the race without stopping again.
Instead, Vettel pitted again on lap 37 for another set of tyres, rejoining fourth about 15 seconds behind the lead group of Raikkonen, Alonso and McLaren's Jenson Button.
Two laps later, an incident between Sauber's Sergio Perez, Lotus's Romain Grosjean and Red Bull's Mark Webber brought out the safety car again and wiped out Vettel's deficit.
It set up a thrilling climax to the race.
The race was restarted with 13 laps to go and as Raikkonen quickly built a three-second lead, Vettel immediately started to pressure Button for third.
Button appeared to have the Red Bull under control but then Vettel made a final push and managed to pass Button for third around the outside into Turn 11 and then taking the inside into Turn 12 on lap 52.
"I had a messy start," said Vettel. "Then behind the safety car I made a little bit of a big mistake with Daniel [Ricciardo] who was stopping behind the safety car on the straight and I was very surprised and I had to go to the right. After that I said I had to go full attack or nothing.
"The second safety car was helping, then a nice fight with Jenson. I was really struggling to pass but then I just squeezed my way past in Turn 11. A thrilling GP, very nice, up and down."
Meanwhile, with seven laps to go Alonso's Ferrari began to come alive and he started closing in on Raikkonen in the lead.
Alonso got the lead down to a second but Raikkonen just held on.
"I'm very happy," said Alonso. "We were not super-competitive this weekend.
"We fought good in the first laps, good overtaking then strategy enabled us to fight for the victory. In the last laps Kimi was a bit slower so we attack, but second was the best possible result for us today. We keep fighting to the end."
Maldonado took fifth ahead of Sauber's Kamui Kobayashi.
Ferrari's Felipe Massa, Senna, Force India's Paul di Resta and Toro Rosso's Daniel Ricciardo completed the top 10.