The US Court of Appeals has ruled against banning therapy for children who struggle with unwanted same-sex attraction or gender dysphoria.
The therapy, often dubbed "conversion therapy", was banned under two ordinances issued in Boca Raton and Palm Beach County, Florida, in 2017.
The ordinances outlawed forms of therapy that "eliminate or reduce sexual or romantic attractions or feelings toward individuals of the same gender or sex," while permitting trans affirmative therapy.
The ordinances were challenged by marriage and family therapists Robert W Otto and Julie H Hamilton, who provide therapy to children with unwanted same-sex attraction or gender dysphoria.
They argued that the ban infringed on their "constitutional right to speak freely with clients" and was a breach of religious freedom, as well as the right of patients to receive information.
In their verdict on Friday, Judges Britt Grant and Barbara Lagoa - both Trump appointments - deemed the ordinances unconstitutional.
"People have intense moral, religious, and spiritual views about these matters — on all sides," Grant said.
"And that is exactly why the First Amendment does not allow communities to determine how their neighbors may be counseled about matters of sexual orientation or gender.
"If there is a bedrock principle underlying the First Amendment, it is that the government may not prohibit the expression of an idea simply because society finds the idea itself offensive or disagreeable."
Grant added: "We understand and appreciate that the therapy is highly controversial. But the First Amendment has no carveout for controversial speech. We hold that the challenged ordinances violate the First Amendment because they are content-based regulations of speech that cannot survive strict scrutiny."