SALMON, Idaho (Reuters) – The American Civil Liberties Union of Idaho on Monday asked a federal judge to strike down a state law it says violates constitutional rights to free speech by banning the documentation of animal abuse at livestock operations.

The law in Idaho, which makes it illegal to take photos or videos at farms or slaughterhouses without the operators’ permission, was passed last month by the Republican-led state legislature and signed by Governor C.L. “Butch” Otter.

The law also makes it illegal to capture images that demonstrate the harm done to public lands by grazing livestock.

The Idaho measure came after ABC News’ Nightline last year aired footage secretly shot by an animal activist of beatings and other abuses of cows at an Idaho dairy.

Lawmakers who support the law say it is necessary to protect the agricultural industry, which adds billions of dollars to the Idaho economy, from unfair and biased investigations.

But the ACLU, animal rights group PETA, the Center for Food Safety and other environmental and political groups argued in the lawsuit filed in U.S. District Court in Boise on Monday that the law violates free speech rights enshrined in the U.S. constitution.

Undercover investigations in the past decade at U.S. animal production facilities have documented such abuses as workers using steel rods to sexually assault pigs and smashing their heads into concrete floors and stomping and throwing chickens and turkeys like footballs, the groups argued in legal documents.

“In order to silence the undercover investigations and corresponding media coverage that contribute to public debate about animal treatment and food safety, industry executives have made the enactment of factory-farm secrecy laws, (which) gag speech that is critical of industrial agriculture, a top legislative priority,” the lawsuit said.

The law is unlike so-called “ag gag” measures enacted in six other U.S. states in that it also criminalizes the photography, sound recording and other documentation of animals such as cows on federally managed, or public, lands.

State Senator Jim Patrick, the Twin Falls Republican who sponsored the legislation, has said it was needed to prevent farmers from being “set up” by activists.

“There are groups that without due process of law, take the videos across the country and intend to destroy the business,” Patrick told ABC News in February.

Those convicted of violating the new law, a misdemeanor, could face up to a year in prison, a maximum fine of $5,000 and restitution of twice the value of any losses to the producer.