Interspecies mating is rare even in closely related species, but how this is prevented is unclear. Here, ablation of chemosensory neurons expressing the chemoreceptor Gr32a in male Drosophila melanogaster caused these flies to initiate courtship with females from their own and other drosophilid species. Similar effects were seen in male D. melanogaster expressing a mutated form of male-specific Fruitless (FruM), which regulates courtship behaviour. Notably, Gr32a neurons were found to synapse onto FruM neurons, suggesting the basis of a circuit that prevents male flies from courting females of another species.