Sainz started the race from pole position and nailed his getaway to control the pace of the race, and he had the early advantage of teammate Charles Leclerc behind him, having jumped the front-row starting George Russell for second place to play the role of rear gunner.
But an early safety car for Logan Sargeant’s crashed Williams jumbled the order at the front when all bar three drivers made their pit stops.
Sainz retained the lead, but Leclerc’s stop was delayed by traffic in the pit lane, dropping him to sixth and leaving the lead car exposed to Russell in the faster Mercedes.
Russell harried the Spaniard for the middle stint of the race, but Sainz was centimetre-perfect in his defensive work and refused to give the Briton a look at the lead.
It took a virtual safety car on lap 44 of 62 to enliven what had looked like a stalemate in the victory battle.
Russell and teammate Hamilton, then fourth, used the reduced field speed to pit for fresh mediums, betting that unleashing its car’s true pace would be enough break the deadlock.
Both were immediately seconds quicker than the leader and on a trajectory for victory. Having dropped to fourth and fifth, they made short work of Charles Leclerc to shadow Lando Norris, who inherited second after their stops.
But with five laps to go Sainz understood the grave threat to his victory and played a clever tactical game to boost Norris’s defence of second place.
The Spaniard slowed down to reduce his advantage to Norris to less than a second, gifting the McLaren driver DRS. With his rear wing flipped open, Norris had enough top speed to fend off the parries of Russell behind him.
Lap after lap the finely balanced dance of pace and defence expertly held Norris into a bulwark, and when the chequered flag fell Sainz had secured himself a famous second Ferrari victory.
“We have to be extremely proud of the weekend that we’ve put together,” he said. “We’ve had one opportunity this year to win the race, which was here in Singapore, and we nailed it.
“We didn’t put a foot wrong all weekend. There was a lot of moments out there where we were a bit under pressure, and we kept it calm, we kept our plan, our strategy.”
Norris admitted to being the pleased beneficiary of Sainz’s self-interest to collect his third podium finish of the season, up from fourth on the grid.
“Carlos played it smart,” he said. “There was no need for me to try and attack him. The more I attacked him, probably the more vulnerable I would have been from both the guys behind.
“It was a stressful last few laps for sure.”
Russell should have been on track to finish third but for a mistake at turn 10, where he struck the outside wall on approach to the left-handed and broke his front-right suspension.
He careened into the wall, ending his gallant chase without points.
Teammate Hamilton picked up the pieces for third to bring Mercedes 15 points in exchange for its strategy gamble.
“We needed to take the risk, have a shot at trying to get past some of these guys and going for the win,” he said. “I think we had really good pace, so I think the team did a great job.”
Charles Leclerc finished fourth, pipping the recovering Max Verstappen over the line by just 0.264 seconds.
Verstappen had started the race 11th after an inexplicably uncompetitive qualifying on Saturday, and the Dutchman gambled on starting on the hard tyre in the hope a late safety car would gift him a free tyre change and bring him into the podium fight.
Instead he got the opposite, and all his chief rivals got a cheap early stop when Sargeant crashed his car on lap 19, ruining his race.
He ran until lap 40 and dropped to 15th after his sole stop, but an aggressive recovery drive got him an unlikely top-five finish at a track that typically features little passing.
Pierre Gasly finished a somewhat fortuitous sixth, inheriting two places from teammate Esteban Ocon, who retired with a technical problem, and Fernando Alonso, who spun out of position in an uncharacteristically scrappy race.
Oscar Piastri rose 10 places from his starting spot to finish seventh in an impressive race by the rookie at his first visit to Singapore.
Sergio Pérez recovered from last after his lap-39 pit stop to eighth with a strong but clumsy recovery drive for Red Bull Racing, but his AlphaTauri stablemate Liam Lawson was more impressive, recording his team’s best finish of the season in ninth to collect his maiden Formula 1 points.
Kevin Magnussen collected the final point in 10th for Haas, the American team’s first score since May.