CHARLESTON, S.C. — It is against state law in South Carolina for public school sex education classes to mention anything other than heterosexual relationships, unless the talk involves sexually transmitted diseases. A federal lawsuit now aims to change that.

The National Center for Lesbian Rights and Lambda Legal said their lawsuit filed Wednesday seeks to overturn the Comprehensive Health Education Act of 1988 as an unconstitutional violation of the equal protection clause of the 14th Amendment.

“The law singles out LGBTQ students for negative treatment,” a news release introducing the lawsuit said. “It prevents LGBTQ students from receiving any health education about their relationships except in the context of sexually transmitted diseases, without imposing any comparable restriction on health education about heterosexual people.”

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

The law also says that any teacher who allows “a discussion of alternate sexual lifestyles” including “homosexual relationships except in the context of instruction concerning sexually transmitted diseases” can be fired.

State Superintendent of Education Molly Spearman, named as a defendant in the lawsuit, agrees that the law is on shaky ground.

She requested an opinion on its constitutionality from South Carolina Attorney General Alan Wilson. That opinion says “a court would likely conclude” that the law violates the equal protection clause requiring that people in similar circumstances be treated the same under the law.

“I agree with the arguments and evidence presented in the opinion,” Spearman said in a statement cited by news outlets. “I also believe that parents should continue to have the final say in whether or not their child participates in health education curriculum.”

Parents can have their children opted out of the school sex education curriculum, said Ryan Brown, a spokesman for the state Department of Education.

Follow NBC Out on Twitter, Facebook & Instagram