The race start was delayed by more than an hour after heavy rain arrived just minutes before the cars were due to set off from the grid, and the climatic conditions completely changed the complexion of the afternoon.
Whereas Leclerc and teammate Carlos Sainz had locked out the front row and should have been able to control the race in the dry, on a wet-but-drying circuit they were put under pressure to gamble on the transition from wet tyres to intermediates and then slicks.
Red Bull Racing, with nothing to lose given the midfield drivers behind the top four were markedly slower in the wet, stopped Perez from third first, switching him from wets to intermediates on lap 16.
Ferrari responded with leader Leclerc, but it waited two laps to do it - a critical error. Perez had nailed the stop window such that he turned an eight-second deficit to four-second advantage, and when the Monegasque rejoined the race with new tyres, he’d lost position.
Once Verstappen pitted and slot back behind Leclerc, Sainz was left in the lead, and the Spaniard was adamant that he would wait until the track was dry enough for slick tyres before making his first tyre change, saving himself a stop. He came in on lap 21 for the hard tyre, having seen some midfielders switch to slicks with success.
But the timing of the pit stop was off, and in the critical first sector when he should have been warming the hard tyre he was stuck behind the slower Nicholas Latifi.
Perez stopped one lap later and rejoined ahead of the Spaniard and in the lead of the race.
Making matters worse for Ferrari, it had mistakenly called Leclerc in for his switch to slicks on the same lap as Sainz, and he was forced to wait several seconds in pit lane for his teammate to have his tyres changed before his own car could be serviced.
Combined with some lapped traffic and his cold tyres, he was jumped by Verstappen, who stopped on the following lap, demoting the pole-getter to fourth.
Perez led Sainz, Verstappen and Leclerc through the final stint of the race, which was shortened by 13 laps on account of the rain delay and another long stoppage for Mick Schumacher’s smashed Haas car and subsequent barrier repairs.
The quartet races closely throughout, and Perez tyres were the first to begin expiring in the final 10 minutes of the race, but around the serpentine Principality streets there was no way for Sainz to break the Mexican’s defences, and Leclerc likewise struggled to make an impression on Verstappen.
After 64 laps and two hours of racing Perez was declared a winner for the third time in his career and for the first time in Monaco.
“It’s a dream come true,” he said, his tears on the podium during the Mexican anthem underlining his emotion. “As a driver you dream of winning here - after your home race there’s no other more special weekend to win.
“The way we did it we made it just a bit harder for ourselves a the end.
“To not make any mistakes, to bring it home, but to keep Carlos behind wasn’t easy.”
Sainz was disappointed that a series of errors cost him a chance at winning his first Formula 1 grand prix on a messy afternoon for Ferrari.
“I felt like we did everything we had to do out there,” he said. “We stayed patient on the wets, we took the right decision.
“You can understand the frustration, because a clean out-lap would’ve secured me the race win today, but that’s how it is sometimes.”
Verstappen, on the other hand, was pleased to secure a podium and consolidate his position at the top of the title standings.
“I think as a team we did a really good job with the strategy to basically get ahead of the Ferraris, and I think as a whole team we can be very pleased with the Sunday,” he said.
“I think we executed it well, and I extended my points lead, which I didn’t expect last night, which is a positive.”
Verstappen’s lead in the drivers championship is now nine points ahead of Leclerc, but Perez has closed to 15 points of his teammate in third after a strong weekend.
Red Bull Racing has also grown its lead over Ferrari in the constructors standings to 36 points.
George Russell finished fifth after undercutting Lando Norris at the first pit stop, though the sixth-placed Norris scored a bonus point for fastest lap of the race.
Fernando Alonso was seventh ahead of Lewis Hamilton, but Esteban Ocon, who took the flag ninth, copped a five-second penalty for hitting Hamilton in a ham-fisted defensive effort earlier in the race, dropping him to 12th.
In his place rose Valtteri Bottas for Alfa Romeo, and Sebastian Vettel moved up from 11th to 10 for the final point of the race.
Pierre Gasly was classified 11th ahead of the dropped Ocon and Daniel Ricciardo. Lance Stroll finished 13th ahead of Nicholas Latifi, Zhou Guanyu and Yuki Tsunoda.
Thai driver Alex Albon retired with a technical problem, and both Haas drivers failed to make the flag, Schumacher with a crash at the swimming pool and Kevin Magnussen with a water leak.