The Spaniard started in pole position and held on with badly worn tires over several tense final laps for his second career win in F1 ahead of McLaren's Lando Norris and the Mercedes of Lewis Hamilton.
The dominant Red Bulls were out of the picture and Formula One has had its most thrilling fight for a win this season.
Runaway standings leader Max Verstappen’s winning run ended at 10 races and Red Bull’s at 15 — both F1 records — as Carlos Sainz Jr. won the Singapore Grand Prix for Ferrari on Sunday.
Red Bull dreamed of winning every race this year but had Verstappen fifth and Perez eighth after struggling all weekend in Singapore.
It was a four-car fight for the win before George Russell crashed the other Mercedes on the final lap from third position to promote Hamilton to the podium.
“I felt under control. I felt like I could manage well and we brought it home. That was the best feeling,” Sainz said after celebrating with his team as fireworks lit up the Singapore circuit.
Sainz admitted after the race he had slowed down to ensure Norris stayed within the one-second window that allowed the McLaren driver access to the DRS straight-line speed boost — a valuable aid in holding off the two Mercedes.
“Carlos was very generous in trying to help me get DRS. It helped my race and also helped his,” said Norris, who has placed second in three of the last six races but has yet to win in F1.
“We held (Mercedes) off, we did everything we needed to do and more,” Norris said he clipped the wall in the same spot where Russell later went off.
Mercedes had Russell on course for second before taking a risk with a second stop for both cars in the hope of taking the win on fresher, faster tires. Russell dropped back to fourth, ahead of Hamilton, and they both passed Ferrari's Charles Leclerc but couldn’t get past Norris to reclaim second.
“We rolled the dice this weekend,” Hamilton said after a Mercedes strategy call saw both cars stop for fresh tires late on, meaning Russell dropped back from second in pursuit of the win.
Leclerc was fourth after failing to hold off the Mercedes cars on older tires, ahead of Verstappen in fifth. The champion had an eventful race after starting 11th and was briefly second on track behind Sainz, though only because almost all other cars stopped for fresh tires. After Verstappen's own pit stop, he fought his way back through the field from 15th.
Despite his worst result since November 2022, Verstappen increased his championship lead to 151 points over Perez with seven races to go. “Everything needs to be perfect to win every race in a season, I knew this day would come and it’s absolutely fine,” he said.
Pierre Gasly was sixth for Alpine, Oscar Piastri seventh for McLaren after qualifying 18th and Perez eighth. Rookie Liam Lawson scored his first points in ninth for AlphaTauri. It was the New Zealander's third career race in F1 since replacing the injured Daniel Ricciardo mid-season and it was the team's best placing of the season. Kevin Magnussen was 10th for Haas.
Besides Red Bull, it was a dismal weekend too for Aston Martin as Fernando Alonso placed 15th after a long pit stop and a spin. His teammate Lance Stroll didn’t take part. The team said Stroll felt sore after a heavy crash in qualifying.