A federal appeals court Thursday upheld a state law that prohibits licensed mental health therapists from trying to change the sexual orientation of minors.

The unanimous ruling by a three-judge panel said the never-enforced law does not violate the free speech rights of patients or professionals, or the fundamental rights of parents. The state has the right to prohibit treatment it deems harmful, the court said.

“The 1st Amendment does not prevent a state from regulating treatment even when that treatment is performed through speech alone,” the court wrote in the ruling.

"Liberty Counsel will ask the full Ninth Circuit Court of Appeals to rehear the case or file a petition with the U.S. Supreme Court," the group announced in a press release.

"Liberty Counsel filed Pickup v. Brown on behalf of minors who are receiving and significantly benefiting from such counseling, their parents, licensed counselors who provide such counsel, and two counseling organizations—the National Association for Research and Therapy on Homosexuality (NARTH) and the American Christian Counseling Association (AACC). In December 2013, Liberty Counsel obtained an injunction from the Ninth Circuit Court of Appeals to block the law. The decision rendered today is by a completely different panel than the one that entered the injunction pending appeal."