Switzerland has voted to impose the strictest penalties in the world for trans- and homophobia, putting them on par with racism.

Those found guilty of either could face up to three years in prison.

The Swiss National Council voted 118 to 60 to change their penal code, making it illegal to discriminate based on gender identity or sexual orientation.

“Victory!” said Mathias Reynard, a national councilor who has fought for over half a decade on the law. “By 118 against 60 and 5 abstentions, the National Council accepts my parliamentary initiative against homophobia and Transphobia! A great success for human rights!”

Victoire ! Par 118 contre 60 et 5 abstentions, le Conseil national accepte mon initiative parlementaire contre l'homophobie et la transphobie! Un magnifique succès pour les droits humains! Réponse finale en décembre au Conseil des États. #LGBT 🏳️‍🌈🇨🇭 — Mathias Reynard (@MathiasReynard) September 25, 2018

The move comes amidst criticism of Switzerland’s legal landscape surrounding LGBTQ people. Marriage is still not legal in the country, meaning that same-sex couples lack legal standing for adoption, welfare, and taxes.

As a result, the country dropped three places in its rankings on the International Lesbian, Gay, Bisexual, Trans and Intersex Association’s (ILGA) annual Rainbow Index in 2017.

This legal change opens the door for a renewed push for marriage rights in Switzerland. At current, Switzerland only allows for civil partnerships for same sex couples.