Germany's top court Wednesday required parliament to legally recognise a "third gender" from birth.
Current regulations on civil status are discriminatory against intersex people, the Federal Constitutional Court said.
Legislators must by the end of 2018 pass a new regulation to offer a third gender option in birth registers, added the court, ruling in favour of an appeal brought by an intersex person.
The plaintiff had brought the appeal after several lower courts had ruled against a bid for gender change to "inter" or "various" in the birth register.
The intersex person was registered as female, but a chromosome analysis found the plaintiff to be neither male nor female.
Intersex is a broad term encompassing people who have sex traits, such as genitals or chromosomes, that do not entirely fit with typical binary notion of male and female.
Intersex people can have features that are neither wholly female nor wholly male, or a combination or neither.
People who identify as intersex are recognised on official documents in some countries including Australia, India, New Zealand and Nepal.