Blood-feeding insects such as mosquitoes are efficient vectors of human infectious diseases because they are strongly attracted by body heat, carbon dioxide and odours produced by their vertebrate hosts. Insect repellents containing DEET (N,N-diethyl-meta-toluamide) are highly effective, but the mechanism by which this chemical wards off biting insects remains controversial despite decades of investigation. DEET seems to act both at close range as a contact chemorepellent, by affecting insect gustatory receptors, and at long range, by affecting the olfactory system. Two opposing mechanisms for the observed behavioural effects of DEET in the gas phase have been proposed: that DEET interferes with the olfactory system to block host odour recognition and that DEET actively repels insects by activating olfactory neurons that elicit avoidance behaviour. Here we show that DEET functions as a modulator of the odour-gated ion channel formed by the insect odorant receptor complex. The functional insect odorant receptor complex consists of a common co-receptor, ORCO (ref. 15) (formerly called OR83B; ref. 16), and one or more variable odorant receptor subunits that confer odour selectivity. DEET acts on this complex to potentiate or inhibit odour-evoked activity or to inhibit odour-evoked suppression of spontaneous activity. This modulation depends on the specific odorant receptor and the concentration and identity of the odour ligand. We identify a single amino-acid polymorphism in the second transmembrane domain of receptor OR59B in a Drosophila melanogaster strain from Brazil that renders OR59B insensitive to inhibition by the odour ligand and modulation by DEET. Our data indicate that natural variation can modify the sensitivity of an odour-specific insect odorant receptor to odour ligands and DEET. Furthermore, they support the hypothesis that DEET acts as a molecular 'confusant' that scrambles the insect odour code, and provide a compelling explanation for the broad-spectrum efficacy of DEET against multiple insect species.