Swiss voters on Sunday rejected an attempt to repeal an LGBT rights bill.

Lawmakers approved the bill in 2018 but opponents, who claim it will censor free speech, collected enough signatures to put it to a public vote.

The bill prohibits discrimination and hate speech based on sexual orientation. According to the AP, the measure makes it “illegal to publicly denigrate” and “stir up hatred based on a person's sexual orientation.”

Voters overwhelmingly approved the bill with a 63-37 percent margin.

LGBT rights activist Jean-Pierre Sigrist told the AFP that police laughed at him when he reported that he had been beaten up outside a bar in Geneva four decades ago. The 71-year-old said that he hopes the new law will help counter a new wave of intolerance against gay people.

Opponents said that the law gives the gay community special rights it does not need.

LGBT rights advocate ILGA-Europe cheered the results.

“Swiss voters have given a message to Europe that they will not tolerate hate by voting to extend anti-racist legislation to cover sexual orientation, meaning that LGBTQ+ people in Switzerland will be legally protected from discrimination and hate speech,” the group said in a tweet.