A small, flowering plant called Arabidopsis thaliana can hear the vibrations that caterpillars trigger when they chew on its leaves. According to a new study, the plants can hear danger loud and clear, and they respond by launching a chemical defense.

From anecdotes and previous studies, we know that plants respond to wind, touch, and acoustic energy. “The field is somewhat haunted by its history of playing music to plants. That sort of stimulus is so divorced from the natural ecology of plants that it’s very difficult to interpret any plant responses,” says Rex Cocroft from the University of Missouri, Columbia. “We’re trying to think about the plant’s acoustical environment and what it might be listening for.”

In this first example of plants responding to ecologically relevant vibrational sounds (i.e. predation), Cocroft and Mizzou’s Heidi Appel combined audio and chemical analyses. First, they placed a tiny piece of reflective tape on a leaf; that way, using a laser beam, they can measure the leaf’s movements as the caterpillar munches.

After they recorded the seemingly inaudible vibrational sounds of caterpillar chewing, they played the recordings back to one set of Arabidopsis plants, while silence was played to another set. To mimic the acoustic signature of feeding, they used piezoelectric actuators, tiny speakers that play vibrations instead of airborne sound. “It’s a delicate process to vibrate leaves the way a caterpillar does while feeding, because the leaf surface is only vibrated up and down by about 1/10,000 of an inch,” Cocroft explains in an university blog post. “But we can attach an actuator to the leaf with wax and very precisely play back a segment of caterpillar feeding to recreate a typical 2-hour feeding session.”

Then, they let cabbage butterfly caterpillars eat about a third of three leaves on each plant from both sets. They gave the plants 24 to 48 hours to respond to the attack, after which the leaves were harvested. “We looked at glucosinolates that make mustards spicy and have anticancer properties and anthocyanins that give red wine its color and provide some of the health benefits to chocolate,” Appel says. “When the levels of these are higher, the insects walk away or just don’t start feeding.”

Plants with prior exposure to feeding vibrations released higher amounts glucosinolates (like mustard oil), an unappealing chemical for the bugs. Feeding vibrations signal changes in the plant cells’ metabolism, Appel explains, creating more defensive chemicals to repel the attack. The work was published in Oecologia this week. Here’s a great video where you can see and hear caterpillars chomping on plants:

Remarkably, plants exposed to vibrations from wind or different insect sounds didn’t increase their chemical defenses. They seem to tell the difference between feeding vibrations and other common sources.

“This research also opens the window of plant behavior a little wider, showing that plants have many of the same responses to outside influences that animals do, even though the responses look different,” Appel says in a news release. The duo is working on figuring out how vibrations are sensed by the plants.