SACRAMENTO, Calif. — A first-of-its-kind ban on a controversial form of psychotherapy aimed at making gay people straight is speeding through the California statehouse.

Supporters say the legislation, which passed its final Senate committee Tuesday, is necessary because such treatments are ineffective and harmful.

“This therapy can be dangerous,” said the bill’s author, Sen. Ted Lieu.

He added the treatments can “cause extreme depression and guilt” that sometimes leads to suicide.

Conservative religious groups emphatically reject that view of sexual orientation therapy and say the ban would interfere with parents’ rights to seek appropriate psychological care for their children.

“While this is a direct assault on everyone’s freedom, it is also a not-so-subtle attack on religious liberty,” the National Association for Research and Therapy of Homosexuality said in a statement.

The bill would prohibit so-called reparative therapy for minors and obligate adults to sign a release form that states that the counseling is ineffective and possibly dangerous. It passed the committee 3-1.

The bill, sponsored by Equality California, will go to the full Senate.

Lieu said attempts to pathologize and change people’s sexual orientation should be treated akin to smoking and drinking — harmful activities that adults can choose to participate in, but children cannot.

“We let adults do all sorts of stupid and risky things, but we ban dangerous things for young people,” Lieu said.

The state legislator was inspired to take up the issue by a cable news documentary featuring people whose parents had attempted to change their sexual orientation.

The doctor featured in the show “was evil,” he said.

Interest in the religion-based therapy appears to have surged in recent years, sparking debates about whether sexual orientation is an immutable characteristic or something people can change.

Exodus International, the world’s largest Christian referral network dealing with homosexuality, now steers people to 260 groups across the country, up from about 100 a decade ago. The organization has 35 ministries and churches scattered around California.

Mainstream mental health organizations say people shouldn’t be seeking out groups like Exodus.

The American Psychological Association said in 2009 that mental health professionals should not tell gay clients they can become straight through therapy.

The association cited research suggesting that efforts to produce the change could lead to depression and suicidal tendencies, and stated that no solid evidence exists that such change is possible.

The American Counseling Association and American Psychiatric Association also have disavowed the therapy. The psychiatric association removed homosexuality from its list of mental disorders nearly 30 years ago.

Last month, the author of a widely-cited 2001 study supportive of the notion that “highly motivated” people can change their sexual orientation retracted his study and apologized to the gay community.