Dutchman Max Verstappen (Red Bull), still largely world championship leader after 17 out of 22 rounds, only finished 7th and did not convert his first chance of a world title on the Marina Bay street circuit.
This is the 4th victory of Pérez's career.
The 32-year-old Mexican has already won the Sakhir GP (Bahrain) in 2020, already at night, then in 2021 in Azerbaijan and in 2022 in Monaco, on two other urban circuits, like in Singapore.
"I think it was my very best performance, I controlled the whole race, even if it was quite complicated", reacted "Checo" Pérez.
Pérez is nevertheless under investigation by the race management and risks a posteriori sanction for having potentially driven too close to the safety car.
Verstappen, who now leads Leclerc by 104 points and Pérez by 106 in the championship, will have another title shot at the Japanese Grand Prix next week.
Lando Norris and Daniel Ricciardo followed in 4th and 5th places, allowing McLaren to move up to 4th in the constructors' championship, ahead of Alpine, which suffered the withdrawals for engine problems from Fernando Alonso and Esteban Ocon.
Singapore was hosting Formula 1 again after two seasons of absence due to the pandemic, and 302,000 spectators have been registered over the whole weekend since Friday.
A record after the 268,000 spectators of the last edition in 2019.
1h05 behind, six retirements
The start was given 1h05 late, due to the heavy rains that fell on the city-state.
The weather was then more clement and the race was able to take place, even if the conditions on the wet track remained very difficult.
Too difficult for some, with six retirements in total: the two Alpines, the two Williams (Nicholas Latifi and Alex Albon), Zhou Guanyu (Alfa Romeo) and Yuki Tsunoda (AlphaTauri).
For the 13th time in 13 editions in Singapore, the race was punctuated by safety car exits.
This, however, did not redistribute the cards in the lead.
Starting 2nd on the grid behind Leclerc, Pérez immediately overtook the Monegasque.
Very little threatened then, he knew how to manage his rhythm and his tyres.
Verstappen had to win and hope for a poor result from Leclerc and Pérez to be titled on Sunday.
But his qualification for 8th position had mortgaged his chances.
On Saturday, the Dutchman had not been able to complete qualifying, his team ordering him to return to the pits because his car was running out of fuel.
Yet able to establish pole position in front of Leclerc, the defending champion had to obey, furious against his team, to avoid disqualification – the tank must contain at least one liter at all times.
In the race on Sunday, as he feared, he could not get back on a circuit which leaves little room for overtaking.
Above all, he then made a mistake: when he wanted to overtake Norris for 4th place, he pulled straight at the turn.
Returning to the pits to change his tires burnt out by this uncontrolled braking, he came out of the top 10, before managing to move up in the points.
Alonso, who did not finish the race, still broke the record for Grand Prix starts held by Finn Kimi Raikkonen.
The 41-year-old Spaniard has competed in a total of 351 Grands Prix since 2001.
Note that a debate exists on the exact total.
The International Automobile Federation (FIA) establishes it at 350, not counting the 2001 Belgian Grand Prix, where he had nevertheless started the race, before retiring and not taking part in the second start given after a accident.
© 2022 AFP