Earlier this month, California became the nation's first state to adopt a law banning harmful counseling therapies that purport to "cure" gay minors of their sexual orientation.

In signing the law, Gov. Jerry Brown rightly said that such practices, based on junk science, "will now be relegated to the dustbin of quackery."

This is a welcome step forward, and a small, but significant sign of how Americans' understanding of human sexuality is slowly progressing. Although Minnesota and other states are wrestling mightily over legal definitions and access to marriage, for the most part society is no longer talking about sexual orientation as a choice.

The change in thinking didn't come swiftly, and some perspective is in order. Nearly four decades have passed since the American Psychiatric Association declared that homosexuality wasn't a mental illness. In 2000, the organization challenged the scientific validity of "conversion" or "reparative" therapies bent on changing gay individuals' sexual orientation or minimizing same-sex attractions.

Earlier this year, 80-year-old Dr. Robert Spitzer recanted and apologized for his 2001 study that claimed that prayer and counseling could lead "highly motivated" gay people to reach their "heterosexual potential." More recently, Exodus International, long dubbed a "pray away the gay" evangelical Christian group, also distanced itself from counseling "cures" for homosexuality. That change in stance is significant and shows evolving opinions in even religiously conservative groups.

Although many religious groups still consider same-sex intercourse a sin, there's widespread agreement that gays and lesbians should be treated with respect. Other religious groups embrace same-sex relationships, ordain gay and lesbian clergy, and affirm individuals' sexual orientation as God-given. But like the rest of society, many religions are somewhere in between: They may welcome gay clergy but not yet offer blessing rituals for same-sex unions.

The California law smartly targets the vulnerable -- young people under age 18. It prevents mental-health providers from attempting to change clients' sexual orientation or trying to "eliminate or reduce sexual or romantic attractions or feelings" toward people of the same sex. "Being lesbian, gay or bisexual is not a disease, disorder, illness, deficiency or shortcoming," the legislation said.

The California bill's sponsor, state Sen. State Sen. Ted Lieu, a Democrat, joined with numerous medical, psychological and gay-rights groups in likening so-called reparative therapies to child abuse, and said they contributed to higher rates of depression and suicide among gay and lesbian youths. Many studies bear out those concerns.

It comes as no surprise that the Pacific Justice Institute, a conservative Christian legal group, has filed a federal lawsuit seeking to block the law on the grounds that it violates First Amendment free speech, privacy and religious freedom. "This unprecedented bill is outrageously unconstitutional," Brad Dacus, the group's president, said in a statement.

But religions should never be allowed to use the Constitution as a shield to exploit and abuse children. That California has taken an unprecedented stand against harmful therapies grounded in archaic understandings of sexual orientation is to be lauded. Let's hope, over time, other states will be as courageous.

---------------------------

The Opinion section is launching a newsletter this fall. Please sign up here.