7-tricosene (7-T) and 7-pentacosene (7-P) are the two main hydrocarbons on the cuticle of male Drosophila melanogaster. These two substances might play a pheromonal role during courtship behaviour. We investigated the genetic basis of the quantitative polymorphism observed in the production of 7-T and 7-P. Strains of different geographic origin, with males producing either predominantly 7-T or predominantly 7-P, were hybridized with strains carrying genetic markers. We found that chromosome II changes the balance between 7-T and 7-P while chromosome III regulates the overall quantity of both 7-monoenes. We have also characterized and roughly mapped sept and smoq, two genetic factors on chromosome II that act additively on the production of both cuticular hydrocarbons. The genetic control of the variation in 7-T and 7-P varies between D. melanogaster strains and between D. melanogaster and its sibling species D. simulans. The possible evolutionary and physiological causes of this variation as well as its functional implication for courtship behaviour are discussed.