(CNN) Hungary has banned people from legally changing gender, in a move rights groups said could lead to further intolerance and discrimination against the LGBTQ community in the country.
The parliament voted Tuesday to stop transgender and intersex people from changing their gender on identity documents.
Lawmakers voted -- with 134 votes in favor, 56 votes against and four abstentions -- to define gender on the basis of "sex at birth," as registered on a birth certificate.
Amnesty International researcher Krisztina Tamás-Sáróy said in a statement published online: "This decision pushes Hungary back towards the dark ages and tramples the rights of transgender and intersex people. It will not only expose them to further discrimination but will also deepen an already intolerant and hostile environment faced by the LGBTI community."
Hungarian rights group Hatter Society said the law violated a constitutional fundamental right and had been opposed by the European Parliament and the UN High Commissioner for Human Rights. It said LGBTI organizations were now requesting the law be sent for review to the Constitutional Court.
The Constitutional Court is the principal organ protecting the democratic state through the rule of law, and decides on the constitutionality of acts of parliament and other cases.
While Hungary is a member of the European Union, Prime Minister Viktor Orban has been forging his own path in recent years, passing a rash of laws that EU leaders have warned will undermine the country's democracy.
However, the government defended the law, telling CNN in an emailed statement that the law "does not affect men's and women's right to freely experience and exercise their identities as they wish.
"In no way does the relevant section of the bill that some people criticize prevent any person from exercising their fundamental rights arising from their human dignity or from living according their identity, just as the state cannot normatively instruct anybody what to think."
Earlier this month, Hungary dropped points in a ranking of European countries for LGBTI rights by the International Lesbian, Gay, Bisexual, Trans and Intersex Association (ILGA) because of "policies targeting LGBTI communities."
Darienne Flemington, co-chair of the ILGA-Europe executive board, said the then proposed ban on legal gender recognition was among "alarming signals of how governments with strong authoritarian tendencies are emboldened by the crisis to further limit the rights of vulnerable groups and minorities."
Hungary currently recognizes legal unions for same-sex couples, but the ruling Fidesz party and its leader, Orban, oppose the legalization of same-sex marriage.
Coca-Cola faced a backlash from politicians and conservative activists in Hungary last August after running ads that included images of same-sex couples kissing and holding bottles of Coke.
At least one leading politician from the Fidesz party and conservative media outlets called for boycotting Coke products or banning the ad campaign.
In 2018, the Hungarian State Opera canceled a third of its performances of the stage musical "Billy Elliot" for this month and July amid criticism by a pro-government media outlet.
But a 2017 poll by the International Lesbian, Gay, Bisexual, Trans and Intersex Association found that more than 60% of the country's residents believe equal rights should be afforded to everyone, regardless of sexual orientation.