The ruling was made late last Friday by U.S. District Judge William Jung and applies to any treatment of psychotherapy that attempts to change or quash an individual’s sexual orientation or gender identity, whether that is talk therapy, aversion therapy, electrotherapy, prayer, hypnosis or orgasmic reconditioning. The latter is a treatment sometimes used on sex offenders.

Not only is conversion therapy highly controversial, but it has been discredited by the science community.

Casey Pick, senior fellow for advocacy and government affairs for The Trevor Project, told Newsweek, they were saddened by the court’s “outlandish” ruling that said only the State of Florida has the legal authority to regulate health care providers.

“This decision is a clear outlier, flying in the face of several other federal rulings recognizing the harms of conversion therapy that we at The Trevor Project hear about regularly from youth who contact us in crisis,” she added.

The ordinance banning the practice was originally introduced by Tampa’s City Council and signed into law by Mayor Bob Buckhorn in April 2017.

Their intention was to protect the physical and psychological well-being of minors from the therapy, which is typically practiced on individuals identifying as LGBTQ or a different gender from the one they were ascribed at birth.

The ordinance stated: The City Council found “overwhelming research demonstrating that sexual orientation and gender identity change efforts can pose critical health risks to lesbian, gay, bisexual, transgender or questioning persons, and that being lesbian, gay, bisexual, transgender or questioning is not a mental disease, mental disorder, mental illness, deficiency, or shortcoming.”

Those who were caught violating the ban faced a fine of $1,000 for a first offense and $5,000 for any repeat offenses.

Jung said the ban interfered with a patient’s privacy rights and the parents’ right to choose health care for their children, as granted under Florida law. His justification for the reversal also mentioned “Florida’s endorsement of alternative healthcare options” and the “well-established doctrine of informed consent,” which he said the ban undermined.

Jung referenced a 2009 report from the American Psychological Association (APA) that found no study has confirmed either benefits or harm from conversion therapies.

He did not mention that the report also advised parents, guardians and young people to avoid treatments that depict homosexuality as a mental illness and to look instead to support and services “that provide accurate information on sexual orientation and sexuality, increase family and school support, and reduce rejection of sexual minority youth.”

“Cures” to treat homosexuality and other sexual orientations considered deviant at the time were developed in the mid-20th century following years of police efforts to police sexual orientation by persecution, according to academic Ivan Crozier, writing for The Conversation.

While more extreme techniques, such as lobotomies and testicular implants from heterosexual donors, have made way for less invasive methods like talk therapy, LGBTQ charities and medical experts warn of the negative health effects such treatment can have on those subjected to them.

A recent survey conducted by the Trevor Project found that 42 percent of LGBTQ youth who had undergone conversion therapy reported a suicide attempt over the past year.

The U.S.’ largest LGBTQ advocacy group, the Human Rights Campaign, states that LGBTQ young people who were rejected by their parents and guardians because of their sexual or gender identity are nearly six times more likely to report high levels of depression, are more than three times more likely to use illicit substances, and are more than three times more likely to be at a high risk of contracting HIV and other sexually transmitted infections.

Even though the APA has explicitly opposed conversion therapy since 1999, an estimated 20,000 LGBTQ youths will be subjected to the practice before they are 18. That’s according to physicians writing in The New England Journal of Medicine earlier this year. The researchers found that some 698,000 U.S. adults identifying as LGBT had already undergone the therapy.

Eighteen states plus the District of Columbia have bans prohibiting conversion therapy for minors, legislation that covers 44 percent of the nation’s LGBTQ population, according to the nonprofit think tank the Movement Advancement Project. Others have legislation pending.

New York City, by contrast, is looking to repeal a ban it introduced against conversion therapy. Advocates fear a legal challenge presented by the Alliance Defending Freedom could make its way to the U.S. Supreme Court, where it would have national ramifications, Reuters reports.

As for Tampa, the Tampa Bay Times reports that the city attorney Gina Grimes has said the city will consult outside counsel before deciding whether to appeal the ruling. The Boca Raton ban that Tampa’s was modeled on was upheld following a similar legal challenge, the newspaper said.

“We want everybody, especially LGBTQ youth, to know this decision applies only to Tampa and does not affect any other laws passed in other Florida cities and counties,” said Pick.

“In light of this ruling, we strongly encourage the Florida Legislature to quickly move legislation to put in place statewide protections to protect all minors in Florida from conversion therapy.”

This article was updated to include comments by Casey Pick.