Palm Beach County on Tuesday became the first county in Florida to ban the controversial practice of conversion therapy for minors, setting up a potential legal battle with those who see the move as an illegal infringement of their freedom of religion and speech.

Eight cities within the county, including Wellington, West Palm Beach and Boca Raton, have already approved similar bans. Tampa has also approved a conversion therapy ban and has since been sued, a move that prompted caution from Palm Beach County Attorney Denise Nieman.

"I would strongly recommend that the board not take action on this," she said as Tuesday’s meeting got underway.

Commissioners don’t often reject the advice of their long-time county attorney, but on this they did, voting 5-2 for the ban, which applies to unincorporated parts of the county and all municipalities that have not already adopted their own ban.

» RELATED: More Florida government news

Commissioners Steven Abrams and Hal Valeche voted against the ban, after they both voted for a motion to delay the vote until after the Tampa case was decided. That motion, offered by Abrams, failed 5-2.

"I’m mindful of the county attorney’s admonition," Abrams said. "We should wait until the Tampa case is resolved."

Valeche shared the free speech concerns of opponents of the ban and questioned whether therapists are actually attempting to change people’s sexual orientation.

"Is this just something people think happens, but it actually doesn’t?" he asked.

Rand Hoch, who backed the ban as president of the Palm Beach County Human Rights Council, said his organization knows of two children who have reported that their parents have forced them to undergo conversion therapy.

Judging from the numerous people who spoke against the ban, Hoch said he suspects that conversion therapy is practiced more widely than is known and that the choice for commissioners was simple.

"Conversion therapy is ineffective, and it causes children harm," he said. "Basically, the choice is between kids and quacks. Please protect the kids."

Many of those who argued against the ban said they had experiences of assisting children who had been abused and, as a result, were left with "unwanted sexual attractions" or gender confusion that could be remedied through treatment.

Rachel Needle, a West Palm Beach therapist, rejected the premise of that treatment.

"Being gay, lesbian or transgender is not a result of trauma or abuse," said Rachel Needle, a West Palm Beach therapist who supported the ban.

Needle and other supporters say the ban is a necessary step to protect young people who could be harmed by therapy that aims to convince young people that being gay, lesbian, bisexual or transgender is a unnatural, wrong or an affront to God.

They said children who are encouraged or forced to reject their sexuality often become depressed or even suicidal.

"Research has shown that (conversion therapy) is harmful," Needle said. "You cannot change or mold someone’s sexuality."

Some of those who addressed commissioners, however, said they have seen children change in their practice. And a couple of people said they were once gay but changed their sexual orientation through prayer and religious faith.

Parents told commissioners the ban would limit options they believe they should be able to exercise for their children.

"It’s my right to choose which counselor I would like to take my child to," said Nicole Davis of Greenacres. "I’m educated enough to do my due diligence."

The county’s ban imposes a fine of $250 on licensed therapists found to have attempted to change a person’s sexual orientation. Each subsequent infraction would bring a fine of $500.

The ban does not apply to parents or clergy who themselves try to change a person’s sexual orientation. County officials say that’s to make sure the ban is narrowly focused and safe from constitutional challenge.

Opponents, however, say the ban is a violation of free speech and religious rights.

"I feel like churches are being viewed as oppressive because we teach what the Bible says," said Steve Thomas, pastor of First Baptist Church in Delray Beach. "I feel like you are telling us we don’t have a right to tell people what the Bible says."

Calling the ban a "wicked proposal," Troy Bailes of Loxahatchee made it clear how he believes the Bible comes down on homosexuality.

"This whole homosexual business is a fad," he said. "It will pass."