Last week, residents of Houston voted by referendum to overturn the city’s one-year-old anti-discrimination ordinance. The vote represents a tragic setback for many vulnerable groups in Houston, while the underhanded campaign against the law may have wider implications for transgender Americans.

Mayor Annise Parker, one of the first openly gay mayors of a large American city, wrote the Houston Equal Rights Ordinance (HERO) after she realized Houston was the only major American city without a similar anti-discrimination measure on the books. It was passed into law by a city council vote in May 2014.

Among other things, HERO made it illegal to fire someone based on 15 legally protected classes, including race, disability status and pregnancy. However, it was the protections for members of the LGBT community that particularly caught the ire of local conservatives. Along with the other protected groups, HERO made it illegal to discriminate on the basis of sexual orientation or gender identity with respect to city employment and city services, city contracts, public accommodations, private employment and housing. Similar laws have already been in place for years in other large cities in Texas, including Dallas and Austin. San Antonio also has such an ordinance, minus the protections around private employment.

Led by several pastors, conservatives in Houston responded to HERO by launching an aggressive campaign that aimed simultaneously to defame the ordinance and eventually to force a public referendum. They particularly set their sights on the transgender community, claiming that protections based on gender identity with respect to public accommodations would allow men to enter women’s restrooms and sexually harass or assault young girls.

Choosing the slogan “No men in women’s bathrooms” for their campaign, the anti-HERO conservatives ran TV ads depicting men following women and girls into women’s restrooms, with the clear aim of conflating transgender women with male sexual predators. Lance Berkman, the popular Houston Astros baseball player who retired early last year, made a TV spot in which he stated that HERO would allow “troubled men who claim to be women” to use women’s bathrooms, implying that trans women represented a threat to his own daughters.

The anti-HERO campaigners put together a petition attempting to force Houston to hold a public referendum on the anti-discrimination measure, but the city reported that they failed to secure the needed signatures ­— a conclusion upheld by a local judge. However, when the anti-HERO campaign appealed to the Texas Supreme Court, the court unexpectedly reversed the ruling, forcing the issue onto the Nov. 3 ballot. Mayor Parker responded by accusing the Texas Supreme Court of playing right-wing politics.

Some HERO supporters have argued that the issue didn’t belong on a ballot in the first place, because nobody’s fundamental rights should be up for a vote. There is no question that members of the 15 protected categories covered by the law face discrimination in Houston and throughout the U.S. While HERO was in place, five of the 11 complaints the city received under the ordinance were the result of someone being denied entry to private clubs on the basis of race. Vice Mayor Pro Tem Jerry Davis argued on behalf of the ordinance by recalling an incident in which he himself was discriminated against as a black man and not allowed to enter a club.