Sexually dimorphic development of the gonad is essential for germ cell development and sexual reproduction. We have found that the Drosophila embryonic gonad is already sexually dimorphic at the time of initial gonad formation. Male-specific somatic gonadal precursors (msSGPs) contribute only to the testis and express a Drosophila homolog of Sox9 (Sox100B), a gene essential for testis formation in humans. The msSGPs are specified in both males and females, but are only recruited into the developing testis. In females, these cells are eliminated via programmed cell death dependent on the sex determination regulatory gene doublesex. Our work furthers the hypotheses that a conserved pathway controls gonad sexual dimorphism in diverse species and that sex-specific cell recruitment and programmed cell death are common mechanisms for creating sexual dimorphism.