Sometimes procrastination pays off. When their environment gets too stressful, many bacteria stuff some of their innards into ultratough packets called spores, which shut down and wait—potentially for centuries—for things to improve. How do these seemingly dead specks sense optimal conditions for revival? A new study in Science reveals that bacterial spores can decide when to wake up by setting an electric alarm.

Starvation, radiation, scorching heat, freezing cold, even the vacuum of space—none is particularly concerning to a spore. But they seem “useless” otherwise, says study author and biophysicist Gürol Süel of the University of California, San Diego. “If you took these cells to the hospital,” he says, “they’d be pronounced dead on arrival.”

Spores are only indestructible while they’re dormant. So they have to avoid waking up (or “germinating”) when conditions are unfavorable, says biochemist Peter Setlow of the University of Connecticut, who was not involved in the study: “If you make the wrong decision and you come back to life, you are dead.”

This study reveals one way spores make that decision. To form a spore, a bacterium creates a copy of its DNA, packs it into a little compartment, wraps the entire thing in a protective coat and then bursts open, releasing the spore (and dying in the process). The forming spore stockpiles charged potassium ions, creating a “biological capacitor” that stores electrical energy, Süel says. Whenever the spore encounters nutrients, a bit of its potassium trove leaks out, dissipating some of the charge. Once this happens enough times, the stored energy dips below a threshold, and the spore germinates—with reasonable chances of not starving.

“This is a significant advance in the field,” Setlow says. “It brings up a whole new way of thinking about germination.” Knowing how spores “count” nutrients could improve food safety, because spore-forming bacteria can survive harsh sterilization procedures and revive to cause food poisoning. Dormancy also helps some disease-causing germs evade attack; waking them early could improve treatments, so “there’s a lot of applied interest in how to get spores to germinate rapidly,” Setlow adds.

The study results hint that ionic countdowns may be fundamental to life on Earth, Süel says. Neurons also count with electricity to know when to fire; the researchers found that formulas that describe neurons neatly predict spore behavior, too. Venus flytraps snap shut using an electric countdown, and all cells harness ion flows to process energy.

“These electrical potentials are not a recent invention. They’re billions of years old,” Süel says. “What other aspects of biology can we better understand by keeping in mind that it’s not just all about gene expression and proteins and DNA—but these charged ions?”