BERLIN (Reuters) - Germany’s highest court ruled on Wednesday in favor of the introduction of a third gender category for people who do not identify as either male or female or are born with an ambiguous sexual anatomy.

A rainbow flag is seen during the annual Gay Pride parade, also called Christopher Street Day parade (CSD), in Berlin, Germany July 22, 2017. REUTERS/Fabrizio Bensch

The Federal Constitutional Court called on lawmakers to enact legislation by the end of 2018 to either allow the introduction of a third category or dispense with gender altogether in civil status documents.

In 2013, Germany became the first European country to recognize indeterminate sex by allowing babies born with no clear gender-determining anatomy to be put on the birth register without a male or female classification.

Wednesday’s decision overturned a ruling by a lower court last year in a case brought by a German citizen born in 1989, identified as Vanja by the Third Option campaign group that supported the plaintiff in the case.

The lower court said it was not possible to be registered as third gender because Vanja could leave the gender identity blank.

However, the Federal Constitutional Court said Germany’s Basic Law, or constitution, protected the personality rights of individuals who do not define themselves as male or female, adding that the current law on civil status interfered with that right.

“The Basic Law does not require that civil status be exclusively binary in terms of gender,” the court said in a statement.

The Third Option group described the ruling as “historic”, but said it is only the “first step on improving the situation of inter and transgender people”.

“Finally it’s recognized by the Federal Constitutional Court that there are more genders than man or woman,” said Mortiz Schmidt, the spokesman of the group.

Antke Engel, the director of The Institute of Queer Theory in Berlin, said she was impressed that ruling gave lawmakers the possibility of dropping the gender category altogether.

“Of course that would be the more radical version,” Engel said.

Jamie Zulauf, a 30-year-old medical student who identifies as transgender, welcomed the move but said it could mean new problems when traveling to countries where a third gender is not accepted.

“It’s going to be visible and it’s not always safe to be visible,” Jamie said.

The government in Berlin estimated in 2013 there were 8,000 to 10,000 intersex people in Germany but interest groups say the number could be closer to 80,000.