In an 8-3 vote Tuesday night, the Miami-Dade County board of commissioners passed an ordinance to prohibit discrimination based on a person's gender identity in housing, employment, and public accommodations.

But the commisisoners' decision was not without objection — nor did they reach it quickly.

Critics came in droves, packing seats at Miami-Dade County Hall and waiting for hours to testify against the ordinance. More than 130 signed up to speak. Pastors, parents, teens, and seniors expressed particular concern that the measure would grant sexual predators a carte blanche to prowl women's bathrooms.

"There are cases of the deviants who will take advantage of this," said Commissioner Esteban Bovo, who represents suburban Miami. He would only support the ordinance if it carved out an exception so it did not apply to transgender people using public bathrooms. "We have to be mindful of a segment of the population, who is probably a majority, who is very concerned with this issue," he said. "It is a concern for the safety of their family."

But in the end, a majority of the commission rejected a bathroom amendment and sided with supporters of the ordinance, who characterized the measure as a basic civil right.

"It's a scare tactic when we come down to the bathrooms and locker rooms," said Commissioner Audrey Edmonson, one of the ordinance's primary co-sponsors. "These are scare tactics." She also rebutted a common complaint that the ordinance was unnecessary. "When someone has been discriminated against, I don't care if it is one person, we were elected to defend those people and provide the protection that they need."

The ordinance adds transgender people to several protected classes under local law, which includes people of color, people of faith, and homosexuals. The ordinance says religious institutions do not need to accommodate protected classes in noncommercial religious facilities.

Mayor Carlos A. Gimenez intends to sign the ordinance, mayoral spokesperson Mike Hernández told BuzzFeed News. "He is 100% supportive. The mayor will not veto — it will become law."

Passing the law in Florida's largest jurisdiction may represent a tipping point for the state, where the Miami Herald reports 20 municipalities have passed anti-discrimination laws protecting transgender people, but there is no all-encompasing statewide law. That could change under a bi-partisan bill introduced into the Florida State Legislature that would ban discrimination for sexual orientation and gender identity.

The debate over transgender rights in Miami-Dade County reflects several others underway in cities around the country, including Cleveland. In that Ohio city, the city council banned discrimination against transgender people but did not explicitly ban discrimination in public restrooms. The council is now weighing a controversial ordinance to cover bathrooms and locker rooms.

The complaints in today's hearing reflected national themes. An educator identifying himself as William Thompson told the Miami-Dade commission that "the ordinance does away with privacy in a very natural moment." Another man warned that if the law passed, "a young man can sit in a girls' locker room with his genitalia showing." Reflecting the most common complaint, another man said the "men wearing female attire" could enter restrooms "to put women and children at risk."

Supporters made an equally impassioned case that anti-discrimination laws do not lead to increased rates of attacks in other cities, predatory crimes remain illegal, and that transgender people want to use the restroom like everyone else.

"This is not about bathrooms," Emily Garcia told the commission. "I am a proud transgender woman. That is not choice." She said anti-discrimination protections are critical in holding down a job and home. Addressing those fixated on restrooms becoming venues for violent attacks, she said, "I am simply afraid I will be persecuted or assaulted for needing to urinate. Or if I used men's bathroom, I am afraid I would be raped myself, not because it's an act of deviance, but about hatred."

As for the outpouring of opposition, Hernández in the mayor's office said, "It is very easy to mobilize people in Miami-Dade county when there is an issue they believe in, but there are a lot of county residents who are supportive." He said opponents "will not change Gimenez's support."