Mighty St. Patrick’s Cathedral is built to withstand a massive inferno like the one that ravaged Notre Dame in Paris.

Fire-proofing was “one of the prime objectives” of the $177 million restoration of the iconic building, completed in 2015, Joseph Zwilling, spokesperson for the Archdiocese of New York told The Post on Thursday.

Working with consulting from the FDNY, experts installed state-of-the-art fire alarms and smoke detectors inside the iconic building.

The attic, which like Notre-Dame’s is made of wood, was outfitted with a high-fog misting system and is monitored 24/7 using cameras, according to experts who worked on the project.

“The big thing they were concerned of, was the case of a fire in the attic,” said Richard Schneider, the senior Vice President of the Structure Tone Organization, which managed the restoration project.

“If something occurs, the alarm will trip, pipes will fill with water and spray out like a mix, stifling oxygen for the flames.”

The misting system would provide the FDNY with “protection and time,” said spokesperson Jim Long. But if the fire spreads fast, it would be a “great challenge,” he added, noting that there’s a firehouse just down the block.

The 141-year-old cathedral’s roof, which is also wooden, was coated in a fire-retardant.

Last night, a New Jersey man arrested for entering the iconic Midtown house of worship with canisters full of gasoline. If he’d succeeded in lighting a blaze, flames in that area wouldn’t have spread, experts said.

“The lower portion is stone, terracotta and plaster … those are reasonably fire-proofing materials,” said Schneider.

“The pews are wood.. but there’s not a lot to burn in the church itself,” he added. “It’s not like there’s a whole inferno that can spread inside.”

Added Long: “There’s not a great number of combustibles… stone and brick, that’s not going to lend to fire extension or development.”