In Drosophila melanogaster, somatic sexual differentiation is regulated by a well characterized genetic hierarchy, by which the ratio of X chromosomes to autosomes ( X:A ) ultimately directs the deployment of sex-specific transcription factors encoded by doublesex (dsx) and fruitless (fru). In other dipterans, the X:A ratio is not the primary sex-determination signal. Correspondingly, the Drosophila hierarchy is not fully conserved. In all non-drosophilid fly species examined, Sex-lethal (Sxl), the master switch at the top of the Drosophila hierarchy, does not control somatic sex. This rapid divergence contrasts with the apparently deep conservation of dsx, which in Drosophila controls virtually all aspects of somatic sex except for male courtship behavior (which is controlled by fru). Sex-specific dsx mRNAs have been reported in Diptera, Lepidoptera and Hymenoptera, and dsx homologs in nematodes and mammals are required for aspects of male differentiation. Thus, it seems that the bottom of the hierarchy is rather ancient, especially compared with the top. To test this, we cloned insect and vertebrate homologs of the Drosophila gene intersex (ix), which functions together with dsx at the bottom of the hierarchy in females. When expressed in D. melanogaster females mutant at the endogenous ix gene, dipteran and lepidopteran ix homologs restore proper sexual differentiation, substantiating the hypothesis that ix, like dsx, is broadly conserved. When the mouse homolog is expressed it produces a dominant-negative phenotype suggesting partial functional divergence. Our results raise the possibility that a functional association between ix- and dsx-related gene products existed before the origin of the bifunctional dsx gene used in insect sex determination.