The history of intersex surgery is intertwined with the development of the specialities of pediatric surgery, pediatric urology, and pediatric endocrinology, with our increasingly refined understanding of sexual differentiation, with the development of political advocacy groups united by a human qualified analysis, and in the last decade by doubts as to efficacy, and controversy over when and even whether some procedures should be performed.

Prior to the medicalization of intersex, Canon and common law referred to a person's sex as male, female or hermaphrodite, with legal rights as male or female depending on the characteristics that appeared most dominant. The foundation of common law, the Institutes of the Lawes of England described how a hermaphrodite could inherit "either as male or female, according to that kind of sexe which doth prevaile." Single cases have been described by legal cases sporadically over the centuries. Research indicates that, in early modern common law, cases of sex ambiguity were resolved through legal evidentiary processes rather than medical diagnosis, relying on testimony and social context. By the nineteenth century, as medical authority expanded, surgical interventions were increasingly used to resolve such ambiguities, not only as treatment but also as a means of establishing a stable and legally recognized sex classification. Diodorus Siculus is the first to record medical procedures associated with intersex gender affirmation surgery in his account of the life of Callon of Epidaurus. Modern ideas of medicalization of intersex and birth defects can be traced to French anatomist Isidore Geoffroy Saint-Hilaire (1805–1861), who pioneered the field of teratology.

Since the 1920s, surgeons have attempted to "fix" an increasing variety of conditions. Success has often been partial and surgery is often associated with minor or major, transient or permanent complications. Techniques in all fields of surgery are frequently revised in a quest for higher success rates and lower complication rates. Some surgeons, well aware of the immediate limitations and risks of surgery, feel that significant rates of imperfect outcomes are no scandal (especially for the more severe and disabling conditions). Instead they see these negative outcomes as a challenge to be overcome by improving the techniques. Genital reconstruction evolved within this tradition. In recent decades, nearly every aspect of this perspective has been called into question, with increasing concern regarding the human rights implications of medical interventions.

Surgical pioneering and constructed gender

In the Byzantine Empire "reconstructive" surgeries on intersex people were performed at least from the seventh century on, in Alexandria possibly as early as the 2nd century. Paul of Aegina (c. 625 – c. 690), quoting Leonidas (Alexandria, 2nd – 3rd centuries), describes in section LXIX (On Hermaphrodites) of his sixth book four types of intersex and how to "cure" three of them by surgically removing the "useless parts". In the next section (LXX, On Extirpation of the Nympha and Cauda Pudendi) he deals with clitoromegaly and how to remove the enlarged clitoris.

In 1779, in England, a seven-year-old intersex child, initially assigned female, underwent the first recorded surgery during modern times, resulting in their reassignment as male.

In the United States genital reconstructive surgery was pioneered between 1930 and 1960 by urologist Hugh Hampton Young and other surgeons at Johns Hopkins Hospital in Baltimore and other major university centers. Understanding of intersex conditions was relatively primitive, based on identifying the type of gonad(s) by palpation or by surgery. Since ability to determine even the type of gonads in infancy was limited, sex of assignment and rearing were determined mainly by the appearance of the external genitalia. Most of Young's intersex patients were adults willingly seeking his help with physical problems of genital function.

Demand for surgery increased dramatically with better understanding of the condition congenital adrenal hyperplasia (CAH) and availability of a new treatment (cortisone) by Lawson Wilkins, Frederick Bartter and others around 1950. For the first time, virilized infants with this variation were surviving and could be operated upon. A conflation was then established between life-saving treatment and cosmetic surgeries. Hormone assays and karyotyping to ascertain sex chromosomes, and the availability of testosterone for treatment led to partial understanding of androgen insensitivity syndrome. Within a decade, most intersex cases could be accurately diagnosed and their future development predicted with some degree of confidence.

As the number of children with intersex conditions referred to Lawson Wilkins' new pediatric endocrinology clinic at Hopkins increased, it was recognized that doctors "couldn't tell by looking" at the external genitalia, and many errors of diagnosis based on outward appearance had led to anomalous sex assignments. Although it seems obvious now that a doctor could not announce to an eight-year-old boy and his parents that "we have just discovered that you are 'really' a girl, with female chromosomes, and ovaries and uterus inside, and we recommend that you change your sex to match your chromosomes and internal organs," a few such events occurred around the world as doctors and parents tried to make use of new information.

Genital reconstructive surgery at that time was primarily performed on older children and adults. In the early 1950s, it consisted primarily of the ability to remove an unwanted or nonfunctional gonad, to bring a testis into a scrotum, to repair a milder chordee or to change the position of the urethra in hypospadias, to widen a vaginal opening, and to remove a clitoris.

John Money, a pediatric clinical psychologist in the new "Psychohormonal Research Unit" at Hopkins, and his partners, John and Joan Hampson, analyzed these assignments and reassignments in an attempt to learn the timing and sources of gender identity. In most of these patients, gender identity seemed to follow the sex of assignment and sex of rearing more closely than it did genes or hormones. This apparent primacy of social learning over biology became part of the intellectual underpinning of the feminist movement of the 1960s. In its application to children with intersex conditions, this thesis that sex was a many-faceted social construction changed the management of ambiguous genitalia from determination of the baby's real sex (by checking gonads or chromosomes) to determination of what sex should be assigned.

The most common intersex surgery offered in childhood was amputation of the clitoris and widening of the vaginal opening to make the genitals of a girl with CAH appear more conformed to the expectations. However, by the late 1950s surgical techniques for transforming assigned male at birth patients to their preferred genitals were being developed in response to requests for such surgery from transgender patients.

Rise of infant surgery and "nurture over nature"

By the 1960s, the young specialties of pediatric surgery and pediatric urology at children's hospitals were universally admired for bringing infant birth defect surgery to new levels of success and safety. These specialized surgeons began to repair wider varieties of birth defects at younger ages with better results. Earlier correction reduced the social "differentness" of a child with a cleft lip, or club foot, or skull malformation, or could save the life of an infant with spina bifida.

Genital corrective surgeries in infancy were justified by (1) the belief that genital surgery is less emotionally traumatic if performed before the age of long-term memory, (2) the assumption that a firm gender identity would be best supported by genitalia that "looked the part," (3) the preference of parents for an "early fix," and (4) the observation of many surgeons that connective tissue, skin, and organs of infants heal faster, with less scarring than those of adolescents and adults. However, one of the drawbacks of surgery in infancy was that it would be decades before outcomes in terms of adult sexual function and gender identity could be assessed.

In North American and European societies, the 1960s saw the beginning of the "sexual revolution", characterized by increased public interest and discussion about sexuality, recognition of the value of sexuality in people's lives, the separation of sexuality from reproduction by increasing availability of contraception, the lessening of many social barriers and inhibitions related to sexual behavior, and social acknowledgment of women's sexuality. In this era, genes and hormones were thought not to have a strong influence on any aspect of human psychosexual development, gender identity, or sexual orientation.

The 1970s and 1980s were perhaps the decades when surgery and surgery-supported sex reassignment were most uncritically accepted in academic opinion, in most children's hospitals, and by society at large. In this context, enhancing the ability of people born with abnormalities of the genitalia to engage in "normal" heterosexual intercourse as adults assumed increasing importance as a goal of medical management. Many felt that a child could not become a happy adult if his penis was too small to insert in a vagina, or if her vagina was too small to receive a penis.

By 1970, surgeons still considered it easier to "dig a hole" than "build a pole", but had abandoned "barbaric" clitorectomies in favor of "nerve sparing" clitoral recession and promised orgasms when the girls grew up. Pediatric endocrinology, surgery, child psychology, and sexuality textbooks recommended sex reassignment for a male whose penis was irreparably malformed or "too small to stand to urinate or penetrate a vagina," because the surgeons claimed to be able to construct vaginas where none existed. The majority of these genetic males who were reassigned and surgically converted had cloacal exstrophy-type malformations or extreme micropenis (typically less than 1.5 cm).

In 1972 John Money published his influential text on the development of gender identity, and reported successful reassignment at age 22 months of a boy (David Reimer) who had lost his penis to a surgical accident. This experiment proved not to be as successful as Money claimed. David Reimer grew up as a girl, but never identified as one. Academic sexologist Milton Diamond later reported that Reimer failed to identify as female since the age of 9 to 11, making the transition to living as a male at age 15. The specific case of David Remier and his rejection of female gender identity despite being socialized and medicalized as a girl showed gender identity as inherent to a person. The surgeries and hormone replacement on David Remier caused the development of gender dysphoria. Reimer later went public with his story to discourage similar medical practices. He later died by suicide, owing to suffering years of severe depression, financial instability, and a troubled marriage.

Complications arise

Throughout the 1980s pediatric surgery textbooks recommended female assignment and feminizing reconstructive surgery for XY infants with a severely inadequate phallus. Nevertheless, in the 1980s several factors began to induce a decline in the frequency of certain types of genital surgery. Pediatric endocrinologists had realized that some boys with micropenis had deficiency of growth hormone which could be improved with hormones rather than surgery, and over the next decade a couple of reports suggested adult outcome as males was not as bad as expected for the boys with micropenis who had not had surgery. Although textbooks were slower to reflect the change, few reassignment surgeries for isolated micropenis were carried out by the 1990s.

In the 1980s research in both animals and humans began to provide evidence that sex hormones play an important role in early life in promoting or constraining adult sex-dimorphic sexual behavior and even gender identity. Examples of apparent androgen determination of gender identity in XY people with 5-alpha-reductase deficiency in the Dominican Republic had been published, along with reports of masculinized behavior in girls with congenital adrenal hyperplasia (CAH), and unsatisfactory sexual outcomes in adult women with CAH. Many endocrinologists were becoming skeptical that reassignment of genetic males to females was just a matter of learning and appearance, or that the newer clitoral reductions would be more successful than clitoral recessions.

However, feminizing reconstructive surgery continued to be recommended and performed throughout the 1990s on most virilized infant girls with CAH, as well as infants with ambiguity due to androgen insensitivity syndrome, gonadal dysgenesis, and some XY infants with severe genital birth defects such as cloacal exstrophy. Masculinizing reconstructive surgery continued on boys with severe hypospadias and the other conditions outlined above, with continued modifications and refinements intended to reduce unsatisfactory outcomes.

Patient advocacy groups speak up

By 1990, biological factors were being reported for a wide variety of human behaviors and personality characteristics. The idea that culture accounted for all the differences between men and women seemed as obsolete as psychotherapy for homosexuality.

A more abrupt and sweeping re-evaluation of reconstructive genital surgery began about 1993, triggered by a combination of factors. One of the major factors was the rise of patient advocacy groups that expressed dissatisfaction with several aspects of their own past treatments. The Intersex Society of North America was the most influential and persistent, and advocated postponing genital surgery until a child is old enough to display a clear gender identity and consent to the surgery. Recommendations from these voices ranged from the unexceptionable (ending shame and secrecy, and providing more accurate information and counseling) to the radical (assigning a third sex or no sex at all to intersex infants). The idea that possession of abnormal genitalia in and of itself does not constitute a medical crisis was stressed. The claims of advocacy groups have been resisted. In response to a demonstration by members of the Intersex Society of North America outside the annual conference of the American Academy of Pediatrics in October 1996, the academy issued a press statement stating that:

In addition to ignoring patients' voices, physicians involved in intersex care had embarrassingly little long-term outcome data to support their claims. In 1997 a patient account was published which could not be ignored. David Reimer's tragic story, told in both popular and medical publications, was widely interpreted by the public and many physicians as a cautionary tale of medical hubris, of the folly of attempting to foil nature with nurture, of the importance of early hormones on brain development, and the risks and limitations of surgery. Some clinicians proposed a moratorium on pediatric sex reassignment, particularly of undervirilized males as females, due to a lack of data that rearing or appearance of genitalia play a major part in gender identity development. Those clinicians encouraged delaying surgery until elected by adolescents to preserve sexual sensitivity.

Similar controversy occurred in Europe and Latin America. In 1999 Colombia's constitutional court limited the ability of parents to consent to genital surgery for infants with intersex conditions. A number of advocacy groups argue against many forms of genital surgery in childhood. In 2001, British surgeons argued for deferring vaginoplasty until adulthood on grounds of poor outcomes for women who were operated on as infants.

Outcomes and evidence

A 2004 paper by Heino Meyer-Bahlburg and others examined outcomes from early surgeries in individuals with XY variations, at one patient centre. The study has been used to support claims that "'the majority of women...have clearly favored genital surgery at an earlier age" but the study was criticized by Baratz and Feder for neglecting to inform respondents that:

In 2006, an invited group of clinicians met in Chicago and reviewed clinical evidence and protocols, argued that and adopted a new term for intersex conditions: "Disorders of sex development" (DSD). More specifically, these terms refer to "congenital conditions in which development of chromosomal, gonadal, or anatomical sex is atypical." The term has been controversial and not widely adopted outside clinical settings: the World Health Organization and many medical journals still refer to intersex traits or conditions. Academics like Georgiann Davis and Morgan Holmes, and clinical psychologists like Tiger Devore argue that the term DSD was designed to "reinstitutionalise" medical authority over intersex bodies.

On surgical rationales and outcomes, the Consensus Statement on Intersex Disorders and their Management stated that: