TAMPA — Working to change gender identity through a process known as "conversion therapy" has been deemed ineffective among mental health experts and broadly derided for techniques that can include electric shock.

But last week, a federal judge ruled that the city of Tampa must allow some parts of the therapy to continue despite a city ordinance adopted in April 2017 that bans it.

U.S. Magistrate Judge Amanda Arnold Sansone issued a limited injunction against the ordinance, affirming the ban on electric shock while finding that verbal counseling is protected by the First Amendment.

The injunction was issued in response to a December 2017 lawsuit by the Christian legal advocacy group the Liberty Counsel challenging the city ordinance.

"This well-reasoned opinion underscores the serious First Amendment violations of laws that dictate what a counselor and client may discuss in the privacy of their counseling session," Mat Staver, Liberty Counsel's founder and chairman, said on the group's website.

Tampa does not comment on ongoing litigation, but city attorney Salvatore Territo said Tuesday that to his knowledge the city hasn't had occasion to enforce the two-year-old ordinance yet.

Allowing conversion therapy to continue drew objections from John Desmond, who with his wife Nancy founded the Tampa and St. Petersburg chapters of the LGBTQ advocacy group PFLAG.

"It doesn't work at all and it is psychologically harmful," Desmond said.

Liberty Counsel is representing the plaintiffs in the case — mental health counselors Robert Vazzo and David Pickup and the Tampa Christian ministry New Hearts Outreach.

A federal judge will review magistrate Sansone's opinion in ruling on the lawsuit.

New Hearts claims to work with people struggling over "unwanted same-sex attractions" and with mental health professionals who specialize in conversion therapy.

Vazzo is a licensed counselor in California, Nevada, Ohio and Florida. Pickup is licensed to counsel in California and Texas, and is in the process of obtaining his Florida license, according to the court filing.

The plaintiffs said they engage only in talk therapy and only treat patients who volunteer for it. Banning such talk therapy, the plaintiffs argued, amounts to banning speech with which the defendants do not agree — an unconstitutional move.

What's more, the judge wrote, the city presented no evidence that minors in Tampa are being harmed by conversion therapy.

"The government has no business eavesdropping inside the counseling session between a counselor and client," the Liberty Counsel's Staver said.

PFLAG's Desmond said there is nothing voluntary about conversion therapy on minors.

"It is not the parents who are getting it," he said. "They are imposing it on a youth who does not have a say."

Under Tampa's ban, therapists and counselors who offer the therapy to minors face a $1,000 fine for a first offense and a $5,000 penalty for subsequent violations.

The ordinance defined conversion therapy as any counseling, practice or treatment aimed at changing someone's sexual orientation or gender identity. That includes efforts to change behaviors or expressions, or to eliminate or reduce sexual or romantic attractions. It does not include counseling for someone undergoing a gender transition or counseling that provides acceptance, support or understanding.

Florida State Sen. José Javier Rodríguez has introduced Senate Bill 84 to prohibit conversion therapy on minors statewide.

Already, 20 local government including Tampa have adopted conversion therapy bans, more than in any other state in the nation, according to the Trevor Project, a non-profit organization focused on suicide prevention efforts among LGBTQ minors.

Conversion therapy has been called ineffective, flawed and risky by professional groups such as the American Academy of Pediatrics, American Psychiatric Association, American Psychological Association, American Psychoanalytic Association and American College of Physicians.

Contact Paul Guzzo at pguzzo@tampabay.com or follow @PGuzzoTimes.