Leclerc had been dominating qualifying around Monte Carlo and was set to double his advantage to almost half a second with his final flying lap when Perez spun his Red Bull at Portier, the corner leading into the tunnel, and smashed backwards into the barrier.
The stricken car blocked the track, and Carlos Sainz, who was close behind him on his own fast lap, was helpless to avoid crashing into him.
Both were unscathed, but the session was red flagged to collect the damaged cars, confirming Leclerc’s pole position.
“It is very special, I’m so incredibly happy,” he said. “It’s been a very smooth weekend.
I knew the pace was in the car. I just had to do the job.”
Assuming Sainz avoids the ire of the stewards for crashing into another car under yellow flags, the Spaniard will line up alongside Leclerc for a Ferrari front-row lockout, having qualified 0.225 seconds behind his teammate.
Sergio Perez will start third assuming the damage to his car isn’t too significant, allowing him to capitalise on a strong weekend relative to teammate Max Verstappen, who qualified an unhappy fourth.
Lando Norris was fifth and 0.473 seconds off the pace for McLaren, comfortably ahead of the next-best midfielder, that being Mercedes driver George Russell, who was a further quarter-second back.
Fernando Alonso qualified seventh despite crashing head-on and all on his own at Mirabeau at the end of qualifying, pipping Lewis Hamilton to the place.
Sebastian Vettel was an excellent ninth for Aston Martin, while Esteban Ocon qualified 10th.
AlphaTauri’s Yuki Tsunoda will start 11th ahead of Alfa Romeo’s Valtteri Bottas, the Finn unable to make good on his high pre-weekend expectations.
Haas teammate Kevin Magnussen and Mick Schumacher qualified 13th and 15th, sandwiching McLaren’s Daniel Ricciardo in 14th, the Australian still suffering from his loss of practice time on Friday to a crash.
Thai driver Alex Albon will start 16th in his Williams ahead of Pierre Gasly, whose qualifying was ruined by an in explicable red flag flown late in Q1 when his teammate, Yuki Tsunoda, picked up a puncture at the chicane.
Tsunoda had made light contact with the barrier, cracking his wheel, but the flag-happy marshals suspended the session despite the Japanese driver being able to continue back to the pits.
Just over two minutes remained when the session resumed, and Gasly didn’t have time to set a lap before the chequered flag fell.
Lance Stroll will start 18th ahead of Lance Stroll, while Zhou Guanyu, who also missed a chance to set his final lap, will start last for Alfa Romeo.