Sex, that is, whether one is physically male or female, is the basic dichotomy of life. Sex is important not only for reproductive role, but also for physical attributes, personal identity and disease susceptibility. Sex determination is genetically controlled, with the key event in males being the transmission of a Y chromosome from father to offspring. The sex-determining gene on the Y chromosome, SRY, triggers the expression of a repertoire of other genes that cause the undifferentiated gonad to develop as a testis. Hormones secreted by the developing testis cause the internal and external genitalia to masculinize. Testicular development is disrupted by de novo or inherited genetic alterations leading to gonadal dysgenesis. Decreased hormone production from dysgenetic testes disrupts the normal development of the internal and external genitalia. Incomplete masculinization of the genitalia also occurs from hormonal biosynthetic defects or decreased response to hormones from inherited receptor defects. Treatment is tailored to the individual diagnosis and may include removal of dysgenetic gonads, surgical correction of incompletely masculinized genitalia, replacement of deficient hormones, and, in some instances, gender reassignment.