Nico Rosberg held off a charging Daniel Ricciardo to win the Singapore Grand Prix and reclaim the Formula 1 world championship lead.
In his 200th F1 race start, Rosberg resisted Ricciardo by just 0.4 seconds to take a third successive victory.
With Rosberg's team-mate Lewis Hamilton only third, the German has now leapfrogged the Briton at the top of the drivers' standings to lead by eight points with six grands prix remaining.
Despite both Mercedes drivers being warned about brake management from the early laps, Rosberg controlled most of the race.
After a safety car for a startline crash and a hair-raising moment as a marshal had to scamper off the track with the leaders approaching at the restart, Rosberg established a comfortable gap over Ricciardo and Hamilton.
Mercedes' choice of softs for its second stint, when Ricciardo stayed on super-softs, left Hamilton moaning at his team over the radio.
Hamilton then found himself under pressure from Kimi Raikkonen's super-soft-shod Ferrari, which got past just after half-distance after a lock-up from the Mercedes.
The second round of stops followed soon after, with the gap between Rosberg and Hamilton in fourth out to 18.9 seconds.
Mercedes then switched Hamilton to "plan B", and he charged up behind Raikkonen and then made an unexpected third stop for a set of ultra-softs with 16 laps to go.
Ferrari was left in two minds on whether to react, and though it hauled Raikkonen in, a superb lap from Hamilton allowed him to pull off the undercut and reclaim third. He then held off Raikkonen to the flag.
Red Bull covered off both those drivers by bringing in Ricciardo for new super-softs, while Mercedes left Rosberg out on his softs.
The Australian started hunting down Rosberg, a 24s gap becoming 5s within seven laps.
But some traffic, fading tyres and Mercedes giving Rosberg the green light to push his brakes harder stymied Ricciardo's charge and he ran out of time to pass.
The dramatic finish matched the start, when Max Verstappen's slow getaway from fourth triggered chaos.
Carlos Sainz Jr and Nico Hulkenberg tangled as they tried to dodge around the Red Bull, sending Hulkenberg spinning into the pitwall and triggering the safety car.
That proved to be the only caution period, but Sebastian Vettel did not need too much help to make it through the field from the back of the grid.
Rapid overtaking in the midfield and a long first stint on softs were the foundation for him to make it through to fifth place.
Verstappen ended up sixth via a late move on Fernando Alonso's McLaren, having had a big battle with his Red Bull predecessor Daniil Kvyat along the way.
Sergio Perez's eighth nudged Force India a point ahead of Williams in their battle for fourth in the constructors' championship as the latter failed to score.
Felipe Massa was only 12th, while Valtteri Bottas picked up damage in the first-lap incident, had to pit with a seatbelt problem and eventually retired.
Kvyat claimed ninth, with Kevin Magnussen 10th for only Renault's second points-scoring finish of the season.
Romain Grosjean's nightmare weekend, which already included two crashes and a gearbox-change penalty, culminated in a brake failure on his Haas that prevented him from even taking the start.
RESULTS - 61 LAPS:
|2||Daniel Ricciardo||Red Bull/Renault||0.488s|
|6||Max Verstappen||Red Bull/Renault||1m11.197s|
|8||Sergio Perez||Force India/Mercedes||1m51.062s|
|9||Daniil Kvyat||Toro Rosso/Ferrari||1m51.557s|
|11||Esteban Gutierrez||Haas/Ferrari||1 Lap|
|12||Felipe Massa||Williams/Mercedes||1 Lap|
|13||Felipe Nasr||Sauber/Ferrari||1 Lap|
|14||Carlos Sainz||Toro Rosso/Ferrari||1 Lap|
|15||Jolyon Palmer||Renault||1 Lap|
|16||Pascal Wehrlein||Manor/Mercedes||1 Lap|
|17||Marcus Ericsson||Sauber/Ferrari||1 Lap|
|18||Esteban Ocon||Manor/Mercedes||2 Laps|
|-||Romain Grosjean||Haas/Ferrari||Not started|
|-||Nico Hulkenberg||Force India/Mercedes||Collision|