Proposition 1 was only on the ballot this year because the Texas Supreme Court in July struck down the ordinance passed by the city council, ruling that the question of anti-discrimination protections must be put before the voters. For supporters, the fall campaign featured a straightforward message about equality and inclusiveness. For opponents, it became all about bathrooms.

Seizing on the proposal’s gender-identity provision, a group calling itself the Campaign for Houston recruited women, pastors, and even the ex-Astros star Lance Berkman to warn that the ordinance would allow predatory men legal cover to enter women’s bathrooms simply by claiming they identify as female. “No one is exempt,” intoned a narrator in one TV ad that featured a young girl in a restroom. “Even registered sex offenders could follow women or young girls into the bathroom. And if a business tried to stop them, they’d be fined. Protect women’s privacy. Prevent danger. Vote no on the Proposition 1 bathroom ordinance.”

The campaign was as explicitly based on fear as any in modern memory. While the group included testimonials from women who said they were followed into bathrooms by men or harassed, they offered no evidence that similar anti-discrimination ordinances on the books in dozens of other cities had led to an uptick in bathroom incidents or violence. And yet, even supporters of the ordinance acknowledged it was effective in playing to the anxieties of voters who may have little familiarity with transgender people. “We’ve known that it takes some time to address that anxiety, address it head on, and also to make sure that voters take a step back and look at what the ordinance actually is and how it would function,” said Richard Carlbom, campaign manager for Houston Unites, a group supporting approval of the law.

Supporters pointed out that it was already against the law in Houston to enter a bathroom with the intent to harass someone. And they branded the equal-rights ordinance with a seemingly unassailable acronym: HERO. But whether their argument was valid or not, opponents had already prevailed in one key political test—having the simpler, easier-to-understand message. “They’ve just run a very disciplined and very effective campaign,” said Mark Jones, a political scientist and a fellow at Rice University’s Baker Institute.

In the waning days of the campaign, Hillary Clinton and Bernie Sanders weighed in with endorsements of the ordinance, while Texas's conservative governor, Greg Abbott, went after Clinton and embraced the opposition’s “no men in women’s bathrooms” slogan at the same time.

HOUSTON: Vote Texas values, not @HillaryClinton values. Vote NO on City of Houston Proposition 1. No men in women's bathrooms. — Greg Abbott (@GregAbbott_TX) November 2, 2015

Both sides expected the election to be close, but in the hours before the vote was counted, Carlbom seemed prepared for a narrow defeat. “What you see in Houston is a reaction to a national climate where Americans now have a freedom to marry,” he told me. “And that fight to secure the freedom to marry took a significant amount of public education, and I think that’s where we’re today.”