Notre Dame was in ruins. Victor Hugo’s novel about a hunchback saved it.

Notre Dame has gone through a lot in its 856 years. It has endured ill-advised remodeling, revolutionary ransacking and pollution-induced decay. Hitler once had it slated for demolition.

On Monday, fire raged through the cathedral, consuming its roof and causing its central spire to collapse. The full scale of “colossal damage” has yet to be assessed, but French President Emmanuel Macron vowed that the Paris landmark would be rebuilt, and donations to do so began pouring in from some of France’s richest families.

“Notre Dame of Paris is our history,” Macron said. “The epicenter of our lives. It’s the many books, the paintings, those that belong to all French men and French women, even those who’ve never come.”

France has rebuilt it before. In the early 1800s, Notre Dame was half-ruined when a writer used the crumbling structure as the setting for one of his greatest works, setting in motion a rescue operation nearly as grand as its original construction.