In September, after one of the most violent wildfire seasons in California history, Gov. Jerry Brown signed a bill that would allow utility companies to charge customers for future legal settlements from the 2017 wildfires—even if they were the utility company’s fault.

It’s meant to prevent Pacific Gas & Electric Co. from going bankrupt; as the AP reported, the company would have to pay billions of dollars if investigators found the company’s equipment at fault for sparking the Tubbs Fire that killed 22 people in Santa Rose and made thousands more homeless.

Unsurprisingly, it’s a controversial law.

Consumer advocates have criticized it as a bailout, with utilities having to augment their efforts to reduce the risk of fires. Furthermore, the law requires to pay the entire cost of accidental fires if they fail to properly maintain electrical transmission stations and distribution power lines.

After yet another devastating summer of flames raging through California’s parched forests, utility executives are forced to figure out one thing: How can they limit the danger of electrical transmission equipment and distribution power lines igniting vegetation and sparking yet another devastating wildfire?

The answer goes beyond just adding more tree trimmers. Artificial intelligence is enabling other industries to perfect just-in-time manufacturing and biotech firms to create precision medicines targeted to an individual patient’s genome; why can’t it prevent deadly fires?

It’s a massive challenge for utilities to track the immediate condition of electricity and surrounding vegetation across their service territories, especially in the broad expanses of the West. Southern California Edison’s wires span 50,000 square miles; Pacific Gas and Electric serves 70,000 square miles. Manually monitoring such large networks for fragile trees, threatening vegetation, or faulty lines, then dispatching crews to fix the problem is an analog answer in a digital world. It’s simply not practical in vast areas; the time required for repairmen to arrive at a downed powerline in the woods can be primetime for a blaze to erupt.

LiDAR—Light Detection and Ranging technology—can change that. By emitting laser-generated light pulses during an overhead flight, LiDAR measures variable distances to the earth, which, integrated with GPS data, can generate three-dimensional topographical images.

The technology has been used to examine electrical transmission systems and generation stations before. But it’s in the far more expansive—and expensive—analysis of distribution networks like that of Pacific Gas & Electric Co. that LiDAR could be a gamechanger.

“ The answer goes beyond just adding more tree trimmers. ”

With the right software, LiDAR data can build 3D models of overhead power line infrastructure in relation to its terrain, allowing for measurement of clearance between wires and vegetation, indications of pole fatigue or damage, and even identification of sagging power lines. LiDAR can also be deployed on drones. Additionally, drones can capture images above utility assets that can be fed into machine learning programs which train to identify abnormalities with poles, insulators, conductors, and fuse switches.

Long-distance drones are perfectly suited for these tasks. Able to fly at low altitudes over power lines, they can map grids and capture images with greater accuracy than helicopters.

But there’s a barriers to wide scale deployment. Current FAA rules govern flight patterns and untethered drones. Special Federal Aviation Administration permits are required for long-range drones; thus far, only two utilities—San Diego Gas and Electric and Colorado’s XCEL Energy—have been granted wider use authorizations. The FAA needs to speed the process of granting approvals because it’s critical that utilities fortify their information gathering capabilities.

Utilities already collect and analyze large amounts of data as part of their transmission and distribution system operations which run from highly-automated control rooms. San Diego Gas and Electric, whose service area by California standards is a relatively modest 4,100 square miles, employs high-resolution cameras and remote weather stations to monitor wind, barometer, temperature and humidity, one of the most unique approaches in the state.

Collecting accurate, detailed data, though, is just the first step towards fully employing artificial intelligence in the fight against fires. Information from fixed cameras, power sensors, drone and aircraft flights, and satellite images can and should be combined with weather and fire histories to build advanced algorithms that can accurately identify anomalies that could predict fire ignition. As computers are fed more data, they will train in those algorithms to recognize potential hazards. It’s time for artificial intelligence to stop wildfires.