By JUAN A. LOZANO, Associated Press

HOUSTON (AP) — An ordinance that would have established nondiscrimination protections for gay and transgender people in Houston failed to win approval from voters on Tuesday.

The Houston Equal Rights Ordinance was rejected after a nearly 18-month battle that spawned rallies, legal fights and accusations of both religious intolerance and demonization of the lesbian, gay, bisexual and transgender community.

With nearly 95 percent of precincts reporting, Houston residents had rejected the ordinance by a vote of 61 percent to 39 percent.

Supporters of the ordinance said it would have offered increased protections for gay and transgender people, as well as protections against discrimination based on sex, race, age, religion and other categories.

Opponents, including a coalition of conservative pastors, said it infringed on their religious beliefs regarding homosexuality. But in the months leading up to Tuesday's vote, opponents focused their campaign on highlighting one part of the ordinance related to the use of public bathrooms by transgender men and women that opponents alleged would open the door for sexual predators to go into women's restrooms.

Democratic Houston Mayor Annise Parker, who is gay, blamed the rejection by voters on opponents' "bathroom ordinance" campaign, which she called "fear mongering" and part of an effort to demonize the LGBT community.

"This was a calculated campaign by a small, very determined group of right-wing ideologues and the religious right, and they only know how to destroy and not how to build up," Parker told a crowd of more than 100 people at an election night watch party in downtown Houston.

Maria Gonzalez, an English instructor at the University of Houston, who supported the ordinance and was at the watch party, said she was disappointed by the measure's defeat.

"The wedge issue has always been gay people. The outsiders come in and say they don't want gay and trans people protected," she said.

The state's top two elected leaders — Gov. Greg Abbott and Lt. Gov. Dan Patrick, both Republicans — praised the defeat, with Abbott saying the voters "showed values still matter."

Patrick, who vaulted to power on the basis of an ardent tea party following, called the Houston Equal Rights Ordinance "liberal nonsense" that voters were right to see as never about equality, saying that was "already the law." Rather, he said it was only about allowing men to enter women's restrooms and locker rooms "defying" — in his words — "common sense and common decency."

Tony Perkins, president of the Family Research Council, a conservative political advocacy group, said in a statement that Tuesday's defeat of the ordinance made Houston "a rallying cry for Americans tired of seeing their freedoms trampled in a politically correct stampede to redefine marriage and sexuality."

The ordinance was initially approved by the Houston City Council in May 2014, but a lawsuit to have residents vote on the measure eventually made it to the Texas Supreme Court, which in July ordered the city to either repeal the ordinance or put it on the ballot.

The ordinance would have applied to businesses that serve the public, such as restaurants and hotels, private employers, housing, city employment and city contracting. It would have allowed residents to file a complaint if they felt they had been discriminated against based on the various protected categories. Religious institutions would have been exempt. Violators would have faced fines up to $5,000.

Tuesday's referendum drew attention from around the nation, with the measure getting high-profile endorsements last week from the White House, high-tech giant Apple and Democratic presidential candidate Hillary Rodham Clinton. It also received support from other members of Houston's religious community.

Campaign for Houston, which fought the ordinance, said opponents included a diverse group of individuals, such as pastors from all denominations and local and state elected officials.

___

Follow Juan A. Lozano on Twitter at www.twitter.com/juanlozano70 .