In Drosophila melanogaster, male courtship behaviour is genetically controlled and is influenced by sex pheromones. 7-tricosene (7-T) induces a dose-dependent inhibition of male-male courtship, whereas 7,11-dienes stimulate male courtship of females. There is a geographical quantitative variation in the production of two predominant male hydrocarbons, 7-T and 7-pentacosene (7-P). We have previously found that 7-P, the main hydrocarbon from males of West African strains, stimulates males that mainly produce 7-T. Using both 'natural' and genetically engineered strains, we find that genetic factors coding for low levels of 7-P in males have co-evolved with factor(s) coding for male responses to high levels of 7-P. These two phenotypes are coded by factors on different chromosomes: the intraspecific polymorphism for the production of 7-T and 7-P is largely controlled by chromosome 2, whereas the variation in courtship towards 7-P-rich males is largely controlled by chromosome 3. The polymorphism of male courtship towards 7-P-rich males shows no correlation with the variation in male responses to female flies.