(CNN)Germany's top court ruled Wednesday that lawmakers must legally recognize a "third gender" from birth.
Once a law is passed, Germany would become the first European country to offer intersex people the option of identifying as a designation other than male or female.
The court ruled that the current system, which "does not provide for a third option -- besides the entry 'female' or 'male,'" is unconstitutional.
In 2013, Germany became the first European country to allow parents of intersex children to leave the gender box blank on a birth certificate.
But Wednesday's ruling in the case, which was brought by an intersex person, goes further, requiring lawmakers to create the possibility for a "positive gender entry" for these babies.
The new legislation must be in force by December 31, 2018, the court said.
Johannes Dimroth, spokesman for Germany's Interior Ministry, said Wednesday: "We fully respect the decision of the Federal Constitutional Court and the government is fully willing to implement the decision."
'A very important step'
Between 0.5% and 1.7% of the global population is born with intersex traits, which means a person does not have typical male-female sex characteristics, according to the United Nations.
Some intersex traits are visibly evident, such as ambiguous genitalia, while there are a number of others which involve genetic, hormonal or anatomical differences.
According to the UN, intersex children and adults around the world are at risk of human rights violations, in the form of surgery, discrimination or even torture.
In 2016, a group of UN and international human rights experts called for "an urgent end" to these violations, urging governments to ban harmful medical practices and protect intersex people from discrimination.
Infants born in Germany with visible variations in their sex characteristics often undergo painful and irreversible surgery to give them the appearance of a conventional male or female gender, according to an Amnesty International report published in May.
"Many intersex people suffer throughout their lives, physically but also psychologically," Maja Liebing, expert in LGBTI rights at Amnesty International in Germany, told CNN.
"This judgment is a very important step for intersex people in Germany," she said. "We hope it can lead to a rethink in society, to a realization that there are more than two genders."
The word that will be used to describe the third sex on official documents is still to be decided. Liebing hopes it will be a term such as "inter" or "divers" (meaning "diverse"). This would mean that the designation would be open to adults who identify as neither male or female -- and who could then change their sex on their birth certificate -- as well as biologically intersex infants.
A law introduced in New York in 2015 led to over 700 people changing their birth certificates to "intersex."
Once passed, the new legislation recommended by the federal court would give Germans the same right.
Many Germans voiced their reaction on social media. "A third gender in the birth register is super...," wrote Twitter user Kenni. "It hurts no one -- quite the opposite. A good step further in the direction of equality and human rights!
Others were less supportive. In a tweet, the Berlin wing of the far-right Alternative for Germany (AfD) party -- the third largest in parliament following September's national elections -- described the recommendation as "the craziest idea of all time."
But Germany is not the first country to move away from the traditional binary understanding of gender. In 2014, the Australian high court ruled that the government should legally recognize a third gender. And earlier this year, California became the second US state (after New York) to allow state residents who don't identify as male or female to change their birth certificates to match their gender identity.