California has become the first state to ban the use for minors of disputed therapies to “overcome” homosexuality, a step hailed by gay rights groups across the country that say the therapies have caused dangerous emotional harm to gay and lesbian teenagers.

“This bill bans nonscientific ‘therapies’ that have driven young people to depression and suicide,” Gov. Jerry Brown said in a statement on Saturday after he signed the bill into law. “These practices have no basis in science or medicine, and they will now be relegated to the dustbin of quackery.”

The law, which is to take effect on Jan. 1, states that no “mental health provider” shall provide minors with therapy intended to change their sexual orientation, including efforts to “change behaviors or gender expressions, or to eliminate or reduce sexual or romantic attractions or feelings toward individuals of the same sex.”

The law was sponsored by State Senator Ted W. Lieu and supported by a long list of medical and psychological societies, as well by state and national advocates for gay rights. Also speaking up for the ban were former patients who described emotional scars they said they were left with after being pushed into the therapy by their parents and finding that they could not change their sexual orientation or did not want to.