SALT LAKE CITY — Nathan Dalley tried to take his own life while undergoing conversion therapy when he was in high school.

The therapist told him the source of his same-sex attraction was childhood trauma and bad relationships. Dalley, of Lehi, was told he could overcome his same-sex attraction if he became more muscular and played sports with other boys. The therapist also recommended Dalley snap a rubber band against his wrist when he had gay thoughts.

”The therapy that was supposed to be changing my sexuality made me spiral deeper into depression, anxiety and shame about who I am,” Dalley said earlier this year.

On Wednesday, Dalley, a 20-year-old University of Utah student, stood with LGBTQ advocates to mark the end of conversion therapy in Utah for minors. Utah became the 19th state in the country to ban the practice as a professional licensing rule took effect Wednesday.

Troy Williams, Equality Utah executive director, said Utah is “hands down the most conservative state to do so.”

Dalley said listening to a recent podcast about a 19-year-old in conversion therapy reminded him of his own feelings of inadequacy and not belonging. He said he hopes that young people at some point realize they are “worth being with us and being just as they are.”

“I believe that this bill communicates that to youth that are vulnerable to this practice and that it protects them from some of the harms I’ve undergone, some of the worst days of my life,” he said.

Dalley said the rule also protects parents from making a mistake that could cost them their child’s life.

“I think ending this practice makes it so that they will find the resources that will ultimately protect their children and help them grow into the individuals that they’re meant to be without harming them or communicating that they’re any less than the rest of us,” said the biology and philosophy major.

Dalley said he’s thankful to live in a state that says “you matter to everyone.”

The yearlong effort to end the practice for minors hit snags until a rule proposed by Gov. Gary Herbert gained the support of LGBTQ groups and The Church of Jesus Christ of Latter-day Saints.

LGBTQ organizations and the church worked toward a legislative solution a year ago, but the effort failed to gain enough support from lawmakers. Herbert then directed the Utah Division of Occupational and Professional Licensing in November to prohibit conversion therapy for minors. The new rule uses language from a bill that did not pass in the 2019 legislative session.

The church opposed an earlier rule — also crafted at the request of the governor after the legislation failed — on the grounds that it did not protect therapists who are parents, grandparents or religious leaders from losing their license if they give spiritual, religiously based counsel. It also clarified that it opposes conversion therapy and its therapists do not practice it.

“When we accomplish something, it’s never something one organization or one person does alone,” Williams said. “We do this work together.”

Williams thanked Herbert for allowing the issue not to become politicized and letting science prevail over politics.

“He kept his word to the LGBTQ community, and we are deeply grateful to him,” he said.

The governor’s office referred a request for comment on the rule taking effect to a November statement in which Herbert said he’s grateful the state found a way forward that will “ban conversion therapy forever in our state.”

Rep. Craig Hall, R-West Valley City, who carried the legislation, said the new rule both prohibits conversion therapy in the state for minors and protects the legitimate interests of therapists and patients and their families.

“It simply will save lives,” he said.

Nanci Klein, director of professional affairs for the Utah Psychological Association, said Utah reached a significant milestone in protecting Utah children from dangerous conversion practices. An estimated 20,000 youth ages 13 to 17 will undergo conversion therapy in states that don’t ban it, she said.

All major world medical and mental health organizations repudiate sexual orientation and gender identity change efforts, she said.

“We reject the label of therapy attached to conversion practices,” Klein said.

Clifford Rosky, a University of Utah law professor who helped write the legislation, said banning conversion therapy is no longer a partisan issue. The Utah law has become a model for other states, he said, adding he has inquiries about it from Arizona, Iowa and Nebraska.

Rosky called the therapy a life-threatening practice that harms children and tears families apart.

Williams said any attempt to undo the rule in the upcoming legislative session would be dangerous for children. He said advocates worked hard to address the concerns of conservatives.

“People are getting to know the LGBTQ community on an unprecedented scale now, and when we know better, we do better,” he said. “The old arguments people have used to exile us from public life just aren’t effective anymore.”