The explosion occurred at around noon Sunday at a three-storey, 52-unit rooming house at 1460 Bélanger Street between Garnier and Fabre streets, on the border of Montreal's Rosemont—La-Petite-Patrie and Villeray boroughs.
The force of the explosion blew out the building's windows, but the building did not collapse.
Five people were injured, three of whom were taken to hospital.
Bob Lamle of Montreal's Urgences-Santé said two of those taken to hospital were men with first- and second-degree burns to 60 to 70 per cent of their bodies.
Lamle said the third victim suffered minor injuries.
One firefighter suffered minor injuries but was not taken to hospital.
"Fire is now satisfied, they've done two sweeps of the building and they are confident that there is no one else left in the building," Lamle told CBC News.
Montreal police spokeswoman Lynne Duncan said officers evacuated several nearby buildings and are controlling the crowd.
Firefighters were able to extinguish the fire shortly after the explosion and are now assessing the building to determine if it's stable.
The cause of the four-alarm incident has not been determined.