It has long been known that some plants can respond to sound. But why would a plant evolve the ability to hear? Now researchers are reporting that one reason may be to defend itself against predators.

To see whether predator noises would affect plants, two University of Missouri researchers exposed one set of plants to a recording of caterpillars eating leaves, and kept another set of plants in silence. Later, when caterpillars fed on the plants, the set that had been exposed to the eating noises produced more of a caterpillar-repelling chemical.

Evidently, the chomping noises primed the plant to produce the deterrent. “So when the attack finally happens, it’s kaboom,” said Heidi Appel, a chemical ecologist and an author of the study. The chemical comes “faster and often in greater amounts.”