A new North Carolina law that lets agricultural and other industry interests sue whistleblowers is being challenged by a federal lawsuit filed Wednesday by consumer advocates and animal rights groups, who say it is unconstitutional.

The law allows companies to sue undercover activists or even their own whistleblowing employees for documenting violations of environmental or worker safety rules. Opponents say the law would prevent the reporting of abuses not just of animals, but of children in day cares facilities and of the elderly in nursing homes.

The suit seeks to overturn the law.

The law “interferes with basic American concepts of freedom of expression,” said David Muraskin, food safety and health attorney with Public Justice, a public interest group that represents the activist groups that brought the suit. “This is a statute designed to gag North Carolina citizens, and prevent them from informing the public and even their own government."

Secret recordings by undercover animal rights groups have revealed allegations of unsafe or unclean business practices, often in slaughterhouses. Food companies have lobbied in state legislatures across the country for the imposition of so called “agricultural gag” or “ag gag” laws to allow lawsuits against whistleblowers. Those sued could be forced to pay substantial damages to the companies.

Such ag gag laws in other states have faced criticism on similar grounds. A federal judge last year struck down one in Idaho as unconstitutional, and challenges remain to similar measures in Wyoming and Utah, Muraskin said.

Environmental groups have expressed concern that North Carolina’s pig farming industry could escape accountability under the law, according to news website Think Progress. Swine manure can pollute ground water if not properly disposed.

The plaintiffs in the suit include public advocacy groups: Government Accountability Project, People for the Ethical Treatment of Animals (PETA), Center for Food Safety, Animal Legal Defense Fund, Farm Sanctuary, and Food and Water Watch.

The law “places the safety of our families, our food supply, and animals at risk, and it attempts to bully and threaten those working for transparency, free speech and the public good,” the groups said in a joint statement.

North Carolina Gov. Pat McCrory vetoed the legislation in June, but the legislature overrode McRory’s veto days later. The law took effect Jan. 1 this year.