Where there’s smoke, there’s fire—and soon there will be drones, too.

The aerospace and defense company Lockheed Martin has developed a number of autonomous aircraft that can work together to fight fires and rescue people, without humans having to risk their lives. The setup uses two small drones to provide reconnaissance, and two automated helicopters to carry out the tasks of putting out fires and recovering stranded victims.

First, a quadcopter drone uses thermal and visible light imaging to identify the location of a fire. It then shares that information with a cargo helicopter that’s been converted to fly without a pilot, which is able to carry water to the scene to extinguish the flames.

Lockheed Martin's autonomous K-MAX helicopter hauling a piece of gear.

Then, a fixed-wing drone can be used to identify people at the site who might be at risk. In much the same way as the first wave of response, it’s able to share information with another autonomous helicopter, which can land nearby so that victims can hop aboard to escape the scene.

According to Wired, Lockheed Martin tested the craft last week, and hopes to have the helicopters actively fighting fires within the next five years. That’s not as crazy as it sounds: autonomous flight is technologically better developed than, say, self-driving cars. While such aircraft might not be put to use in urban areas, they’d be perfectly well-suited to dealing with wildfires.

Still, regulation remains a problem. Until recently, red tape had hindered commercial drones in the U.S., but even with that now out of the way, an air-traffic-control scheme still needs to be developed for automated craft. If that logistical issue is resolved, rescue workers dealing with wildfires may be able to step away from the front lines in the coming years and let drones take over.

(Read more: Lockheed Martin, Wired, “New FAA Rules Have Commercial Drones Primed for Launch”)