Citizens of Houston overwhelmingly voted down a measure that would have created legal protections in 15 categories, including sexual orientation and gender identity.

For months, opponents waged a war on the so-called “bathroom ordinance” that would allow transgender individuals to use the bathroom of their choice. On Tuesday, their work paid off, with more than 60 percent of voters rejecting the measure.

“We are very pleased, obviously, with the incredible results,” said Dave Welch, executive director of the Houston Area Pastor Council, a group that’s been fighting the ordinance since 2014.

“From the very beginning, this really was our position that this was not a good fit for Houston—this was not something that was consistent with what the the people [wanted]. It took eighteen months to get here and half a million dollars in legal fees—it was a very expensive campaign—but we are very pleased with the outcome.”

In a joint statement to press, supporters of the legislation, including the Houston Unites campaign, the ACLU of Texas, and the Human Rights Campaign, said in light of Tuesday’s results, they won’t back down from the fight.

“We’ve learned some important lessons,” the statement said. “We have to continue sharing our stories so that more Houstonians know what HERO is really about and aren’t susceptible to the ugliest of smear campaigns run by the opposition.”

The ordinance, named the Houston Equal Rights Ordinance (HERO), originally passed 11-6 last year in the Houston City Council, but opponents forced the measure to a public vote by obtaining 55,000 signatures, well beyond the 17,269 needed to force a referendum.

Yet, the city claimed that only 15,000 of the signatures they obtained were valid and refused to place the issue on the ballot.

That’s when Welch and his fellow pastors fought back, filing a lawsuit against the city of Houston.

As the dispute played out, Welch and four other local pastors had their sermons and other communications subpoenaed by the city’s attorney.

Houston Mayor Annise Parker, who first introduced HERO, eventually withdrew the subpoena. This summer, the Texas Supreme Court ruled that the city must either bring the initiative to a vote or withdraw it completely.

HERO applies to city employment and city services, city contracts, public accommodations, private employment, and housing.

In addition to sexual orientation and gender identity, the ordinance protects 13 other classes including sex, race, color, ethnicity, national origin, age, familial status, marital status, military status, religion, disability, genetic information, and pregnancy.

The drawn out dispute pitted Houston at the center of the latest battle between LGBT and religious liberty advocates.

Supporters of the ordinance call it “sensible” and say it’s a good policy for Houston businesses. More than 60 local companies came out in support of the measure, along with seven big businesses.

>>> Read More: Meet 7 Big Businesses Behind the Houston Ballot Measure

HERO advocates also accused opponents of running a “fearmongering” campaign by arguing that the measure could allow sexual predators into women’s restrooms.

“Houston residents should not succumb to that ugly fearmongering,” wrote the New York Times editorial board. “Those who vote ‘yes’ to retaining the ordinance will be affirming the city’s most valuable asset: its longstanding culture of inclusiveness.”

But opponents of HERO say they have legitimate concerns about its implications for bathrooms, locker rooms, and other sex-specific facilities.

“The proposed law defines gender identity as ‘innate identification, appearance, expression, or behavior as either male or female, although the same may not correspond to the individual’s body or gender assigned at birth,’” wrote Ryan T. Anderson, a senior research fellow at The Heritage Foundation and author of the new book “Truth Overruled.” “No legal change of name or gender, and no surgery or hormone treatment is required to identity as transgender—simply one’s self-professed and chosen identity, appearance, mannerisms, or behavior.”

>>> Read More: What Makes This Houston Ballot Measure So Threatening

Furthermore, critics cite concerns about HERO threatening the freedom of citizens to carry out their religious or moral beliefs about marriage and human biology.

At the polls, more than 60 percent of voters rejected the measure.

“Thankfully, it was a strong turnout and the results were very decisive,” Welch said.