“Children who are born with atypical sex characteristics are often subject to irreversible sex assignment, involuntary sterilization, involuntary genital normalizing surgery,” a 2013 report from the United Nations special rapporteur on torture found, noting that they were left “with permanent, irreversible infertility and causing severe mental suffering.” Human Rights Watch has condemned such procedures.

Hayley Gorenberg, general counsel at Lambda Legal, said the German ruling appeared to give parents of intersex children the option to wait until the child was old enough to determine which gender, if any, to identify with.

“It seems to be very clearly about not forcing people into a particular gender marker label, and I think that’s very important,” she said. “The fact is, just like any other personal characteristics, gender is on a spectrum and not everybody falls into the binary category of male or female.”

The new decision comes in the case of German citizen born in 1989 who was identified only as Vanja, by Third Option, an advocacy group that supported the plaintiff.

The German Constitution guarantees the right to personal freedom, which protects sexual identity.

“The assignment to a gender is of paramount importance for individual identity; it typically occupies a key position both in the self-image of a person and how the person is perceived by others,” the court found. “It also protects the sexual identity of those persons who are neither male nor female.”

Current laws that require a person to register as either male or female interfere with that right and are discriminatory, the court found.

It added that the existing law’s limitation of binary gender options only to male or female was discriminatory.