A cabbage hiring wasp hitmen to protect it from a butterfly invasion sounds like the premise of a deranged children's movie. But new research shows something like that actually might happen in nature.

Plants give off a range of chemical distress signals when they're under attack from diseases, pests and even lawnmowers. Black mustard, a cabbage relative, produces chemicals called plant volatiles when a certain butterfly decides to take up residence on its leaves, and a European team of researchers investigated what role these signals play in building the plant's defenses.

The researchers reported Sept. 5 in the journal PLoS ONE that black mustard gives off a specific scent when large cabbage white butterflies (Pieris brassicae), as they are called, lay eggs on it. This odor both repels other pregnant butterflies from laying more eggs on the plant and attracts two species of parasitic wasps, Trichogramma brassicae and Cotesia glomerata. The wasps swoop in and attack the butterfly eggs and the caterpillars that have hatched from them, the researchers said. This defense mechanism prevents a colony of caterpillars from feasting on its leaves. (In return, the wasps parasitize, or live off, these eggs.)

The study, led by Nina Fatouros, of Wageningen University in the Netherlands, showed that black mustard's response is highly specific to large cabbage white butterflies. When a less common pest, the cabbage moth (Mamestra brassicae), lays eggs on the plant, it does not trigger the same release of plant volatiles, the researchers said.

The study was based on experiments in a greenhouse setting and the researchers wrote in their paper that they are following up with studies of these dynamics under natural conditions.

Follow LiveScience on Twitter @livescience. We're also on Facebook & Google+.