History of intersex surgery
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.
Source: Wikipedia — History of intersex surgery (CC BY-SA 4.0)