There was a time when people would take doses of mercury for just about any ailment. No, it didn’t really help. Often it made things worse, sometimes much worse. And there was a chance it could result in death.

The modern-day equivalent is so-called “conversion therapy,” where practitioners believe they can “cure” a patient’s same-sex attraction. It’s an (almost) universally discredited and disavowed practice, surviving predominantly in die-hard religious communities.

It can prove incredibly damaging to young people subjected to the antiquated pseudo-science. One recent university study found that youth victims of conversion therapy were twice as likely to suffer from depression and two to three times as likely to attempt suicide.

It is pure voodoo.

A whole long list of organizations including the American Academy of Pediatrics, the American Counseling Association and the American Psychological Association have all said homosexuality is not an illness and cannot and need not be cured.

The American Psychological Association in 2009 reported that conversion therapy increases the risk of substance abuse and addiction, severe depression, risky sexual behavior, feelings of dehumanization and suicide.

So state Rep. Craig Hall had a fairly modest proposal: Ban the practice on children in Utah and, in the process, maybe save some young lives.

The Church of Jesus Christ of Latter-day Saints has publicly and repeatedly disavowed the practice of conversion therapy and after weeks of hammering out language agreed to remain neutral on Hall’s bill as it was proposed. For the church to be neutral is a big deal on an area where in years past it may have resisted such a bill.

In a sign of just how bad conversion therapy is, in January, David Matheson, once a pre-eminent conversion therapist, left his straight marriage and said he would begin dating men. “I realized I couldn’t stay in my marriage any longer," he said at the time. “And I realized that it was time for me to affirm myself as gay."

But apparently the notion that trying to “pray away the gay” was harming young people and shouldn’t be condoned was too much for some in the Legislature. Rep. Karianne Lisonbee, R-Clearfield, and a small group of ideologues — working hand-in-hand with fringy practitioners of the conversion therapy quackery — not only hijacked Hall’s bill, they attempted to go even further.

Lisonbee’s disingenuous replacement would actually have given the reprehensible practice protection in state law, legitimizing an illegitimate treatment, so long as those who engaged in it didn’t explicitly promise that they could turn the kids straight.

It also stripped out any reference to “gender identity,” because in the eyes of the right-wing ideologues like Lisonbee and Rep. Brady Brammer, that doesn’t really exist — which is why earlier in the session we saw a push to prohibit changing a gender on a birth certificate.

Until recently, I thought conversion therapy was a relic of a bygone era. But it is still practiced, and to drive home the point, the snake-oil salesmen time-traveled from the 1970s to the legislative committee this week — not to apologize for the harm they’ve caused, as they should have, but to publicly defend their malfeasance.

And it worked. The committee approved Lisonbee’s replacement and she pushed this terrible proposal with the backing of Gov. Gary Herbert.

It was a disappointing about-face from the governor, who days earlier had called conversion therapy “barbaric,” then endorsed a version of the bill enshrining the barbaric practice in state statute.

For Troy Williams, executive director of Equality Utah, it was more than disappointing. Williams and Taryn Hiatt, of the Utah chapter of the American Foundation for Suicide Prevention, resigned from Herbert’s suicide task force in protest, saying they would not serve as “window dressing” for a group that wasn’t serious about addressing the causes of LGBTQ suicide.

I was hopeful that reason would prevail and the bill could be salvaged this session and maybe some youth might be spared from being subjected to the mercury of conversion therapy. But the risk that Lisonbee’s bill might actually pass was deemed too great, so they’ll try again next year.