Volatile terpenoids play a key role in plant defence against herbivory by attracting parasitic wasps. We identified seven terpene synthase genes from lima bean, Phaseolus lunatus L. following treatment with either the elicitor alamethicin or spider mites, Tetranychus cinnabarinus. Four of the genes (Pltps2, Pltps3, Pltps4 and Pltps5) were up-regulated with their derived proteins phylogenetically clustered in the TPS-g subfamily and PlTPS3 positioned at the base of this cluster. Recombinant PlTPS3 was able to convert geranyl diphosphate and farnesyl diphosphate to linalool and (E)-nerolidol, the latter being precursor of the homoterpene (E)-4,8-dimethyl-1,3,7-nonatriene (DMNT). Recombinant PlTPS4 showed a different substrate specificity and produced linalool and (E)-nerolidol, as well as (E,E)-geranyllinalool from geranylgeranyl diphosphate. Transgenic rice expressing Pltps3 emitted significantly more (S)-linalool and DMNT than wild-type plants, whereas transgenic rice expressing Pltps4 produced (S)-linalool, DMNT and (E,E)-4,8,12-trimethyl-1,3,7,11-tridecatetraene (TMTT). In laboratory bioassays, female Cotesia chilonis, the natural enemy of the striped rice stemborer, Chilo suppressalis, were significantly attracted to the transgenic plants and their volatiles. We further confirmed this with synthetic blends mimicking natural rice volatile composition. Our study demonstrates that the transformation of rice to produce volatile terpenoids has the potential to enhance plant indirect defence through natural enemy recruitment.