In the nematode Caenorhabditis elegans, germ cells normally adopt one of three fates: mitosis, spermatogenesis or oogenesis. We have identified and characterized the gene fog-3, which is required for germ cells to differentiate as sperm rather than as oocytes. Analysis of double mutants suggests that fog-3 is absolutely required for spermatogenesis and acts at the end of the regulatory hierarchy controlling sex determination for the germ line. By contrast, mutations in fog-3 do not alter the sexual identity of other tissues. We also have characterized the null phenotype of fog-1, another gene required for spermatogenesis; we demonstrate that it too controls the sexual identity of germ cells but not of other tissues. Finally, we have studied the interaction of these two fog genes with gld-1, a gene required for germ cells to undergo oogenesis rather than mitosis. On the basis of these results, we propose that germ-cell fate might be controlled by a set of inhibitory interactions among genes that specify one of three fates: mitosis, spermatogenesis or oogenesis. Such a regulatory network would link the adoption of one germ-cell fate to the suppression of the other two.