Chemical control of insect pests is considered a necessary evil of modern intensive agricultural practices. New approaches exploiting chemical ecology and genetically modified plants as ‘green factories’ point the way to harvests that are less reliant on insecticides.