Using classical genetic research techniques and the new methods of genetic engineering, biologists have discovered the gene they think determines whether a fetus develops as a male or female.

The gene appears to instruct cells to make a chemical that is a "genetic switch." When the chemical, called "testis-determining factor," or TDF, is made in large enough amounts, it activates cells to begin developing into testes and other male parts. Without the TDF, the sex cells in the fetus develop into ovaries and other female parts.

"This is a landmark set of experiments," said David Baltimore, head of the Whitehead Institute for Biomedical Research in Cambridge, Mass., where the discoveries were made. "This is a classic use of very rare human genetic defects to find out something important about human biology."

In addition to finding the human gene, the group carried out a series of what they called "Noah's Ark Blots" to look for similar genes among other mammals. They found very similar genes in all the mammals tested, including gorillas, rabbits, goats and dogs.

The discovery, described in the issue of Cell that appears Thursday, is a leap forward in the understanding of sex determination, according to researchers familiar with it, and a significant advance in the more general problem of developmental biology -- how a single cell can develop into organs made of billions of cells with different shapes and actions.

The experiments hinged on the results of studies of about 90 unusual "sex-reversed" patients, that is, men and women who appeared to have the genes for one sex while they are anatomically the opposite sex. Studying the aberrant genes of these patients led researchers directly to the sex-determining gene, said Dr. David C. Page, a medical doctor and geneticist who headed the nine-member team that discovered the gene. The Whitehead Institute, affiliated with the Massachusetts Institute of Technology, is a prominent center for research in molecular biology.

Since the early part of this century, researchers have thought that chromosome count was an important indicator of sex. The chromosomes are the genetic material of a living thing, thousands of genes wound up into knot-like shapes that are passed from parents to offspring as their genetic inheritance.

In humans there are 23 pairs of chromosomes, with each parent contributing half of each pair. In the 1920s it was determined that humans have "sex chromosomes," that is, chromosomes which appear different in men and women.

Women have two identical X chromosomes. Men inherit one X chromosome and one Y chromosome. The presence of a Y chromosome was thought to be the determining factor in gender. Some people have as many as three extra copies of the X chromosome, but if a Y is present, they become male. If there is no Y, they become female.

The researchers have several theories about how TDF works. While they're sure that the gene for it appears on the Y chromosome, there also may be a copy on the X. If that is the case, there are two possibilities. One is that the X chromosome is inactive and the gene does not produce the protein TDF.

Another possibility is that the genes on both X and Y produce TDF, and that together they produce a male. But in a female there are two X chromosomes, and a rule of nature is that only one works. Therefore, in females, a lesser amount of TDF is produced and a female is formed.

Sex determination begins just after six weeks of development in the fetus. Before that time, the fetus has developed what is called the "indifferent gonad," a partly formed sex organ that is not yet definitely male or female.

In determining gender, Page said, "the crucial initial decision is whether the 'indifferent gonad' is going to become an ovary or testis, because the testis or ovary then establishes the hormonal environment which is responsible for carrying out all the other differentiation" such as production of male or female hormones, and the creation of organs such as fallopian tubes, uterus and vagina or their male counterparts.

Until now, researchers had not known the chemical mechanism by which this initial, crucial decision to develop as male or female was made.

"We think we have identified a single gene on the Y chromosome that constitutes this sex-determining switch. Now, we think we can infer certain things about its mode of action," Page said.

In the 1960s researchers discovered the "sex-reversed" patients, such as the one man in 20,000 who has no Y chromosome, but only two XX's, and the similarly rare women who have a Y chromosome but do not become physically male. The patients with these genetic syndromes are sterile, and have some abnormal sexual development, but most appear to be normal.

Page and his group have used genetic engineering techniques to search the genes of these patients over the past six years. They found that the patients' chromosomes were not normal XX female and XY male genetic material. Instead, among XX men, they found fragments of material from a Y chromosome mixed in. Among XY women, they found fragments of the Y chromosome missing.

As it turned out, there was a neat match between the sexes.

One of the patients was a 12-year-old girl who seemed sexually normal until she developed a type of ovarian tumor that signaled sex-reversal. She was found to have the male sex chromosomes -- both X and Y.

But the researchers carried out a search of her Y chromosome by a technique called a "chromosomal walk." In it, the researchers cut and examined one fragment after another, moving down the length of the chromosome, trying to match each to normal Y chromosome material.

The researchers found only one-five hundredth of the Y chromosome missing. The researchers reasoned the the sex-determining factor must be on that small piece of the Y chromosome.

Confirmation came from the XX male patients. They found that while they had only fragments of a Y chromosome, all had that same small bit that was missing from the 12-year-old girl.

In the final step, the researchers studied the genetic information on that piece of chromosome and found that it carried the code that would instruct cells to make a protein.

The protein is one that regulates other genes, aiding the production of some chemicals in the cell or blocking the making of others. It is the cascade of different chemicals being turned on and off in cells that determines what shape and function each cell will have.