Estimates of this occurring range from one in 1,500 or 2,000 births, to 4% of all births, depending on what definitions are used.
Whether surgery, hormone treatment or both are necessary, or whether they represent child abuse and it's better to do nothing, has stirred considerable debate.
Chromosomes and sex development
Genetic differences between men and women lie in sex chromosomes. Women have two X chromosomes and men have a single X (from their mother) and a male-specific Y (from their father).
In typical male development, a single gene (SRY on the Y chromosome) kick-starts a cascade of genes that make a testis. The embryonic testis makes hormones, and hormones make the baby male.
In an XX fetus with no SRY, other genes become active to make an ovary in an embryo that will become a girl.
Both cascades involve many genes in a network of checks and balances. So far we know of about 30 that must work together to build a normal testis or ovary.
Other genes control development of the genitals and secondary sexual characteristics such as breasts and body hair. It takes many genes to make a penis from flaps of skin that have to come together in the right way, or to zip up the labial folds to make a scrotum.
Like any complex process, sex determination can go awry.
Atypical sex development
Different conditions result from variants in one of several genes controlling sex development.
Some can lead to minor anatomical differences, such as the opening of the penis appearing at an unusual site; others to ambiguous genitals.
For instance, loss or alteration of a gene in the testis-determining pathway prevents testes from forming, and may produce an XY baby with masculinised female genitals (an enlarged clitoris, for instance). Some of these children may become more masculine when hormones rev up at puberty.
Other gene variants can reverse sex altogether, as in cases of androgen insensitivity. A variant in a gene for male hormones will cause an XY baby to develop as a female, even though she has testes.
At the tragic end of the spectrum are mutations that disrupt more than sexual development. Deletion of a gene controlling sex as well as bone formation can cause bone deformities so severe that babies can't breathe and die within hours.
It's impossible to lump this spectrum of conditions into a single category. The term intersex, for instance, describes those with ambiguous genitals, or gonads with both testis and ovarian tissue. But it doesn't apply to others, such as XY girls with androgen insensitivity.
Disorders of sex development (DSD) is the term adopted medically. Not surprisingly, patients quail at labels like this that denote a disease and invite discrimination.
Normal vs abnormal?
In genetic variation, the border between what is normal (short and tall people) and abnormal (dwarfism and gigantism) is often fuzzy.
Everyone carries genetic variants that are lethal or cause malformation if you have two copies. For instance, I have a gene variant that causes slight webbing of toes, two copies of which would leave me without toes or fingers.
Whether or not variations in sexual development can, or should, be treated depends on the condition.
Many children with atypical sexual development show varying degrees of genital abnormalities, some of which can be corrected surgically. A penis can be repaired and a vagina can be fashioned for girls with androgen insensitivity.
Some conditions may be life-threatening if not recognised early. For instance, children with CAH (congenital adrenal hypoplasia) make too much androgen but not enough of another two vital hormones. Without prompt treatment, they may die from losing too much salt.
Is it better to treat?
It's possible to assign babies of uncertain sex to either a boy or girl and use hormone treatment to reinforce the gender choice. Whether this is appropriate has been vigorously debated by patients, doctors and advocacy groups.
For decades, surgeons advocated operating early because it had better medical success and provided a consistent gender identity. This was often successful and many patients reported living satisfying lives.
But it raised problems of informed consent, as parents made the decision on their child's behalf as to which sex they would be. What if they got it wrong and the child grew up hating who they were?
Some people have reported growing up never feeling comfortable or accepted in their gender role. There are many accounts – real life and fictional – of difficult transitions to the other sex, as in the Pulitzer-Prize winning novel Middlesex.
Now, the trend is to be supportive, conservative and avoid removing genital tissues if the condition is not life threatening.
But there are no universal answers. In a perfect world, it wouldn't matter if a child was a boy, girl or a happy intersex. But our society is sexualised and children can be cruel to those even trivially different.
Adults are sometimes no more accepting; in some Asian and African countries families with DSD children may be ostracised and children neglected or killed.
Developed countries are moving in the right direction in their treatment of DSD people and community attitudes are slowly improving.
Hopefully we can become more accepting of genetic variation, whether it be towards webbed toes or sex determination.
Image credit: iStock