When XX germ cells develop in a testis they become spermatogenic. Thus, somatic signals determine the sex of genetically female germ cells. In contrast, XY germ cells experimentally transferred to an ovary do not differentiate oogenic cells. Because such cells show some male characteristics when analyzed in adults, it was assumed that XY germ cells autonomously become spermatogenic. Recently, however, evidence showing that a female soma feminizes XY germ cells was reported. The conclusion was drawn that the sex determination of XY germ cells is dictated by the sex of the soma. We monitored the fate of XY germ cells placed in a female environment throughout development. Here we report that such germ cells respond to both cell-autonomous and somatic sex-determining signals, depending on the developmental stage. Analyzing the expression of sex-specific molecular markers, we first detected autonomous male-specific gene expression in XY germ cells embedded in female embryos and larvae. At later stages, however, we found that sex-specific regulation of gene expression within XY germ cells is influenced by somatic gonadal cells. After metamorphosis, XY germ cells developing in a female soma start expressing female-specific and male-specific markers. Transcription of female-specific genes is maintained, while that of male-specific genes is later repressed. We show that in such XY germ cells, the female-specific gene Sex-lethal (Sxl) is activated. Within the germline, Sxl expression is required for the activation of a further female-specific gene and the repression of male-specific genes. We thus report for the first time the existence of downstream targets of the gene Sxl in the germline.