Germany's highest court has ruled in favour 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.

Key points: Court says law still protects sexual identity of people who are neither male nor female

Court says law still protects sexual identity of people who are neither male nor female German Minister for Families welcomes decision

German Minister for Families welcomes decision Germany has until end of next year to implement court ruling

The Federal Constitutional Court ruled on a case in which a plaintiff, identified by advocacy group Dritte Option only as Vanja, born in 1989, sought to have their entry in the birth register changed from "female" to "inter/diverse" or "diverse".

Officials rejected the application on the grounds the law only allows for children to be registered as male or female, or for the gender to be left blank.

The plaintiff argued it was a violation of their personal rights.

In a three-year legal battle, Vanja provided courts with a genetic analysis showing the plaintiff has one X chromosome but no second sex chromosome.

Women have two X chromosomes, while men have one X and one Y chromosome.

The court found the law protects sexual identity, which has a "key position" in how individuals perceive themselves and are perceived by others.

It said "the sexual identity of those people who can be assigned neither to the male nor the female sex is also protected", and said the constitution also protects them against discrimination because of their gender.

The Government has until the end of 2018 to draw up new rules.

Court offers two options to comply with constitution

The court said authorities have two ways to ensure that the rules comply with the constitution.

It said they could decide to do without any gender entry in civil registers but could also "create the possibility for the affected people to choose another positive designation of their sex that is not male or female".

Dritte Option, which has campaigned for a third gender option and was involved in preparing the case, said on Twitter that it was "completely overwhelmed and speechless".

"This borders on a small revolution," it added.

The Minister for Families in Chancellor Angela Merkel's outgoing Government, Katarina Barley, said a third gender option was "overdue".

Ms Barley's centre-left Social Democrats have vowed to go into opposition after Germany's September election, but Ms Merkel's conservatives are negotiating with two socially liberal parties to form a new administration.

Interior Ministry spokesman Johannes Dimroth said the Government was studying the verdict and would abide by the court's December 2018 deadline.

AP/Reuters