Utah officially banned the controversial practice of conversion therapy on minors this week, ending a long battle between local LGBTQ activists and religious groups.

The ruling, which went into effect Tuesday, outlaws the discredited practice grounded in the belief that being LGBTQ is unnatural. Conversion practices sought to convince a person who felt otherwise to identify as heterosexual or, in the case of transgender persons, to identify with their birth genders.

Utah Gov. Gary Herbert, a Republican, announced the decision in November, saying it could go into effect as early as Jan. 22. His office confirmed it went into effect on Tuesday, but declined to comment further when reached by ABC News.

Herbert said he issued the ruling after reaching common ground with LGBTQ rights groups and The Church of Jesus Christ of Latter-day Saints, which previously expressed concerns over a potential ban due to possible infringements on religious freedoms.

In a statement at the time, Herbert said he'd "learned much" through the process of crafting the rule alongside LGBTQ advocates.

"The stories of youth who have endured these so-called therapies are heartrending, and I'm grateful that we have found a way forward that will ban conversion therapy forever in our state," Herbert said in a statement. "I'm grateful to the many stakeholders who came to the table in good faith, with never-ending patience."

Eighteen other states, the District of Columbia, and more than 60 municipalities have adopted similar protections, according to the National Center for Lesbian Rights.

"Utah's emergence as the most conservative state to address this issue shows how rapidly attitudes toward LGBTQ youth are changing in every part of this country," Shannon Minter, the center's legal director, said in a statement Wednesday. "No matter what one's political or religious affiliation may be, more and more people are recognizing that public officials have a responsibility to protect vulnerable youth from this life-threatening harm."

Many of the country's most prominent medical and mental health professional organizations, most recently the American Medical Association, have come out in support for a federal ban on conversion therapy.

Equality Utah, which had been fighting for a ban alongside other LGBTQ advocacy groups, celebrated the ruling in a statement Wednesday.

"Every reputable science-based organization in the country recognizes that conversion therapy is a dangerous fraud," Troy Williams, the group's executive director, said. "It exacerbates depression, anxiety, and suicide ideation. We are grateful to Governor Herbert and the Board of Psychologists for acting swiftly on behalf of LGBTQ youth."

Research shows that nearly 700,000 LGBT adults between age 18 and 59 admitted to enduring conversion therapy, including about 350,000 subjected to the practice as children, according to a study released in June 2019 by the Williams Institute at the University of California, Los Angeles.

Separately, two-thirds of LGBTQ youth surveyed by the The Trevor Project, which provides support for LGBTQ youth as well as resources for crisis and suicide prevention, reported that someone tried to convince them to change their sexual orientation or gender identity, according to the nonprofit group's 2019 National Survey on LGBTQ Mental Health.

Young people who have undergone conversion therapy were more than twice as likely to attempt suicide as those who did not, according to the survey.