A federal judge has just ruled in favor of a Florida county’s ban on conversion therapy.

U.S. District Judge Robin Rosenberg ruled that Palm Beach County’s and the city of Boca Raton’s bans on state-licensed mental health professionals providing conversion therapy to minors were likely constitutional and refused to issue an injunction. An injunction would have allowed conversion therapy to continue while the lawsuit works its way through court.

Robert Otto and Julie Hamilton, two conversion therapists, argued in their lawsuit that their free speech rights were being violated by the bans since their methods involve talking.

Rosenberg agreed that their rights were being burdened, but ultimately decided that the city and county had good reasons to ban conversion therapy.

Related: A federal court just found a First Amendment right to force kids into conversion therapy

They “relied upon extensive credible evidence of the damage that conversion therapy inflicts,” she wrote.

She cited research that showed the link between conversion therapy and depression, social isolation, and suicidal thoughts.

Rosenberg also noted that the bans don’t prevent Otto and Hamilton from advocating conversion therapy in the public sphere.

Liberty Counsel, a hate group, is representing the conversion therapists and said that her decision is “flat-out wrong.”

A spokesperson for the organization said that the Supreme Court ruled in NIFLA v. Becerra last year that there is no distinction between professional speech and other forms of constitutionally protected speech.

NIFLA v. Becerra involved a California law that required, among other things, crisis pregnancy centers to say in their advertising that they are not licensed medical facilities and that no licensed medical personnel work there.

Conversion therapy bans, though, apply exclusively to people with state licenses.

LGBTQ rights supporters hailed the ruling.

“The good thing here in Palm Beach County, the kids are protected and they will continue to be protected,” said Rand Hoch, who founded the Palm Beach County Human Rights Council.