A newborn infant with ambiguous genitalia is a medical emergency, and the choice of gender must take into account both the chromosomal and the gonadal sex, the hormonal milieu during fetal life, surgical aspects, the anatomy of the internal genitalia, as well as the prospects for future fertility, normal psychosexual development, and sexual function as an adult. Counselling requires paediatric endocrine, surgical, and psychological expertise, but the lack of knowledge of the long-term consequences of an intersex condition hampers rational treatment. It has long been customary to assign the child a female gender, whereas recent research points to a choice of a gender compatible with the chromosomal sex, if at all possible. This article reviews our knowledge in this field.