In research that could give doctors a way to reassign sex in cases of unclear gender, scientists report this week that they have figured out why some children with genes that should make them boys are instead born as girls.

The study, published in Nature, explains why some embryos with X and Y chromosomes—which should be born as male—develop ovaries and eventually become girls.

The key is whether a gene called Sox9, involved in formation of the testes, is active. "There are a surprisingly large number of cases where this process goes wrong," says Robin Lovell-Badge, a biologist at London's MRC National Institute for Medical Research, who estimates that this phenomenon could effect up to 1 in every 20,000 genetic males. "Maybe one could treat some of these sex reversal or intersex cases after birth by manipulating whether Sox9 is active or not. This is all speculation but it's possible."

If Sox9 is somehow switched on in a genetic female—an embryo with two X chromosomes—it causes male gonads to form; if it fails to turn on in males, the cells it controls will become follicle cells, which mature into ovaries.

To work out this process, Lovell-Badge and his colleagues manipulated the Sox9 gene in genetically engineered mice. They found that what switches on Sox9 is the product of two other genes. When either of those genes—one of which is found on the Y chromosome, only carried by males—is defective, Sox9 remains off and the embryo develops ovaries.

Richard R. Behringer, a geneticist at the University of Texas's M.D. Anderson Cancer Center in Houston, called the study "an important step." Behringer, who was not involved in the research, says scientists must now determine how Sox9's activity actually leads to the creation of testes.

Lovell-Badge and his colleagues believe that the findings in mice will apply to humans as well, particularly in diagnosing "male" embryos that are likely to develop into girls. That's important, he says, because those people are at higher risk for ovarian tumors.

He adds that he's very hopeful that with further analysis, scientists may determine ways to reassign gender later in life, "perhaps for cases of sex reversal or perhaps even for individuals who want to undergo sex changes," although he acknowledged that "this is getting very contentious."