A conservative legal defense group is suing to try to block a new law in California that will ban therapies that aim to “cure” gay teens.

The Pacific Justice Institute filed the lawsuit on Monday in federal court in Sacramento on behalf of a marriage and family therapist, a psychiatrist and a man studying to become a mental health professional. It names as defendants Gov. Gerry Brown and a host of other state officials.

Brown on Sunday signed SB 1172, a bill sponsored by state Sen. Ted Lieu, D-Torrance, that would prohibit therapists from administering “sexual orientation change therapy” to gay and lesbian children under 18. California became the first state in the nation to crack down on “gay cures” for minors.

Brown and Lieu said such “gay conversion” therapies are not based on science and in some cases have driven teens to commit suicide.

The law is scheduled to take effect Jan. 1.

“Of all the freedom-killing bills we have seen in our Legislature the last several years, this is among the worst,” Brad Dacus, president of the Pacific Justice Institute, said in a statement. “This outrageous bill makes no exceptions for young victims of sexual abuse who are plagued with unwanted same-sex attraction, nor does it respect the consciences of mental health professionals who work in a church. We are filing suit to defend families, children and religious freedom. This unprecedented bill is outrageously unconstitutional.”

The lawsuit states:

“The statute materially interferes with the plaintiff mental health professionals’ exercise of their independent professional judgment in providing treatment to minors who have unwanted same sex behaviors or attractions. As such, the statute requires the plaintiff mental health professionals to discriminate against minors who are gay, lesbian, bisexual or questioning youth. This is in violation of these plaintiff mental health professionals’ obligations under the rules of professional ethics to provide treatment to persons regardless of their sexual orientation.”

Lieu, a former prosecutor, called the lawsuit "frivolous."

"Under the plaintiffs' argument, the First Amendment would shield therapists and psychiatrists from medical malpractice and psychological abuse claims simply because they use speech in practicing their medicine. That is a novel and frivolous view of the First Amendment.”

Kate Kendell, executive director of the National Center for Lesbian Rights, also said the lawsuit is meritless. “This lawsuit is a desperate, last-ditch effort to defend the indefensible,’’ Kendell told The Los Angeles Times.

The National Association for Research & Therapy of Homosexuality, or NARTH, a group of therapists who believe sexual orientation can be changed, has also said it plans to file a lawsuit to block implementation of the law.

Previous story:

California becomes first state in nation to ban 'gay cure' therapy for children

More content from NBCNews.com:

Follow US News from NBCNews.com on Twitter and Facebook