The alarm pheromone for many species of aphids, which causes dispersion in response to attack by predators or parasitoids, consists of the sesquiterpene (E)-beta-farnesene (Ebetaf). We used high levels of expression in Arabidopsis thaliana plants of an Ebetaf synthase gene cloned from Mentha x piperita to cause emission of pure Ebetaf. These plants elicited potent effects on behavior of the aphid Myzus persicae (alarm and repellent responses) and its parasitoid Diaeretiella rapae (an arrestant response). Here, we report the transformation of a plant to produce an insect pheromone and demonstrate that the resulting emission affects behavioral responses at two trophic levels.