Many animals eat plants. Some plants eat animals. While the first scenario is not puzzling, the second still holds some mysteries, even for scientists. How, exactly, does a plant know how or when to eat an animal?

In the case of the Venus flytrap (Dionaea muscipula) – one of the world's most famous and mesmerising plant carnivores – it's all a matter of timing. Whether you're a fly or a spider, a beetle, or a grasshopper, timing is absolutely crucial if you want to avoid becoming lunch.

That's because a Venus flytrap's closure response almost always requires two successive stimuli before the trap is sprung. Sensory hairs inside the flytrap need to feel you in the 'mouth' region twice to spring shut, and both contacts have to occur within about 30 seconds.

010 venus flytrap 1(NIBB)

If the window between the first touch and the second touch becomes longer than 30 seconds, the Venus flytrap 'forgets' the first touch ever happened. But… how does a plant with no brain remember anything, and for that matter, how the heck can it tell when 30 seconds is up?

These are good questions, and scientists came close to answering them about 30 years ago when German researchers proposed the Venus flytrap's closure was somehow triggered by a rise in calcium ions in the plant, with two successive sensory contacts pushing calcium concentration past a sufficient threshold to spring shut.

It's taken three decades, but we finally now have experimental confirmation of that hypothesis, which wasn't able to be tested back in the late 1980s.

In a new study led by developmental biologist Mitsuyasu Hasebe from Japan's National Institute for Basic Biology (NIBB), researchers figured out a way of visualising intracellular calcium concentrations inside the plant to see if the chemical did indeed underpin the flytrap's power to remember and forget.

With the help of a bacterium called Agrobacterium, which is capable of transferring genes to plants, the researchers engineered transgenic Venus flytraps equipped with a calcium sensor – a protein called GCaMP6 – that emits green fluorescence when it binds to calcium.

In effect, the Venus flytrap would literally glow brighter each time its sensor hairs felt something. In the wild, such a visual change might alert prey to the threat of being munched; in the lab, though, it proved the perfect way to test the calcium hypothesis, gauging levels of the chemical's concentration by measuring levels of fluorescence intensity when the flytrap was prodded with a needle.

In experiments, the researchers observed that when a sensory hair was first touched, it would start glowing almost instantly, with a wave of fluorescence then spreading outwards across the rest of the plant, revealing the temporary surge in calcium signalling.

"The electrical excitation of the trap cells is thus translated into an increase in the concentration of calcium," explains senior author and biophysicist Rainer Hedrich from the University of Würzburg in Germany.

"If a further action potential comes, its calcium value is added to the first signal. Using this calcium clock, the Venus flytrap can count the number of the touch stimulation-conditioned action potentials."

010 venus flytrap(NIBB)

If another contact isn't felt quickly enough, however – within about 30 seconds, give or take – the intracellular calcium concentration dissipates, effectively telling the Venus flytrap to stand down.

Nothing to see here. There might once have been a fly, but it flew away. Or perhaps it was just a pesky raindrop. Hmm, I'm hungry.

The findings are reported in Nature Plants.