Last fall the military lost control of an unmanned surveillance blimp: The craft unmoored itself from a base in Maryland and drifted 100 miles over Pennsylvania, leaving destruction in its wake. A trailing tether downed powerlines and cut off electricity for tens of thousands of people; 911 lines were overwhelmed; college classes were canceled; and fighter jets were even deployed to track the blimp.

But all of that chaos could have been avoided if someone had done the sort of basic maintenance that keeps smoke detectors working: No one loaded the batteries needed to power an automatic-deflation device on the blimp, according to the Los Angeles Times.

The blimp was meant to be stationary, held tight by a tether that also transferred power and data between the floating behemoth and the ground. Technically an "aerostat," the craft could soar up to 10,000 feet as part of a test program designed to help spot things like enemy missiles and drones. It was dubbed JLENS.

Even before the runaway blimp incident, the program caused some to raise questions about the import of technology designed for battlefields to the domestic arena. And despite a $2.7 billion investment, JLENS appeared to struggle at detecting suspect aerial objects. But the program didn't truly break into public consciousness until the blimp broke free.

Here are the best social videos of that military blimp floating over Pennsylvania on Oct. 28. (Gillian Brockell/The Washington Post)

A Pentagon investigation found that a number of factors led to the disaster: First, a device used to measure air pressure inside the blimp malfunctioned. Because of that malfunction, fans that should have turned on due to changes in atmospheric conditions did not operate and air pressure inside the blimp fell, according to the L.A. Times, which cited anonymous people who have seen the Pentagon report.

The blimp also turned perpendicular to heavy gusts of winds, which bent its tail fins out of shape. That left the blimp unstable and put more pressure on its tether than it could with stand.

However, the craft was equipped with a device that should have deflated it and returned it to the ground within two miles -- which would have effectively contained much of the damage and prevented a flood of incredulous headlines. But no one had installed the batteries that should have served as backup power to the system in this kind of scenario.

"The lack of batteries prevented the automatic rapid deflation device from deploying," Michael Kucharek, a spokesman for the North American Aerospace Defense Command and the U.S. Northern Command, confirmed to the Times.

So the true moral of the story might be this: Always have a backup -- especially when you're running a program whose malfunction could look like an embarrassing metaphor for bloated military spending running wild.