The French government has a daunting task ahead. The fire at Notre Dame de Paris destroyed its roof and spire and damaged a 62-foot stained glass window along with one of the world’s largest pipe organs. Priceless stonework was likely weakened by the extreme heat. Repairs will be arduous and expensive.

Still, the damage might have been much worse, if not for the drones Paris firefighters borrowed from the culture and interior ministries. (The fire brigade does not yet have its own drones capable of working at sufficient heights.)

Firefighters used two commercial models made by the Chinese manufacturer DJI—the Mavic Pro and Matrice M210—both of which feature thermal cameras. These were used to track how the fire was spreading and trace where the flames may have originated. In turn, as the French newspaper Libération reports, the images were used to work out the most effective way to position fire hoses. The aerial vantage points guided the strategy for tackling the blaze. By contrast, according to the report, a helicopter would have been less flexible and more expensive.

Ordinarily, flying a DJI drone or quadcopter over central Paris would be blocked by law and technology alike: The manufacturer, in recognition of government policy, uses geofencing to block flights near airport runways. (Paris le Bourget airport is about nine miles, or about 14km, from the cathedral.) These restrictions seem to have been temporarily unblocked to allow the drones to fly over Notre Dame.

Speaking to FranceInfo, fire brigade spokesperson Gabriel Plus credited the drones with helping officials make the decisions that in turn saved the cathedral’s two belfries at a critical moment.

“The drones allowed us to use our available means in the best possible way,” he said. An “extinguisher robot” was also used inside the cathedral, allowing firefighters to put out the flames without putting any lives at risk.