A federal judge has ruled that Iowa's "ag gag" law is unconstitutional, saying the industry-backed statute violates the First Amendment's free-speech protections.

Senior Judge James Gritzner granted summary judgment Wednesday to a group that sued over the law.

"Today's decision is an important victory for free speech in Iowa,” said Rita Bettis Austen, ACLU of Iowa legal director.

“It has effectively silenced advocates and ensured that animal cruelty, unsafe food safety practices, environmental hazards, and inhumane working conditions go unreported for years."

► Support local journalism. Subscribe to the Des Moines Register.

The ACLU challenged the law, along with Bailing Out Benji, Iowa Citizens for Community Improvement, the national Animal Legal Defense Fund and People for the Ethical Treatment of Animals, among others.

"Today's victory makes it clear that the government cannot protect these industries at the expense of our constitutional rights," said Stephen Wells, executive director of the Animal Legal Defense Fund.

Attorney General Tom Miller's office, a defendant representing the state, said the office is considering whether to appeal.

The 2012 Agricultural Production Facility Fraud law made it a crime for journalists and advocacy groups to go undercover at meatpacking plants, livestock confinements, puppy mills and other ag-related operations to investigate working conditions, animal welfare, food safety and environmental hazards, among other practices.

► More: Could Iowa's 'ag gag' law be undone by Idaho court ruling?

"It was never the intent of farmers to infringe on others' constitutional rights," the Iowa Pork Producers Association said in a statement. "We were relying on the courts to help us protect our rights to lawfully conduct our businesses and care for our animals."

The group said it would evaluate its options, adding that it will continue to fight efforts to "destroy or attack" their livelihoods.

Undercover investigations have included reports that Iowa workers hurled small piglets onto a concrete floor and have beat pigs with metal rods.

Some lawmakers supported the legislation, saying they wanted to stop "subversive acts" by "groups that go out and gin up campaigns … to give the agricultural industry a bad name."

In defending the law, the state argued that its restrictions were constitutionally permissible because they ensured biosecurity and private property protections.

Gritzner said that wasn't enough to outweigh First Amendment presumptions.

"Defendants have produced no evidence that the prohibitions" of the law "are actually

necessary to protect perceived harms to property and biosecurity," he wrote.

Iowa already has laws that protect private property and addresses biosecurity concerns, Gritzner said, making ag-gag state law unnecessary.

The ruling says "there are other ways to protect this interest without trampling on free speech," said Kristine Tidgren, director of Iowa State University's Center for Agricultural Law & Taxation.

The state also argued that the law regulated "conduct, not speech."

But Gritzner pointed to an earlier ruling, saying "speech is necessarily implicated" because Iowa's law can't be violated "without engaging in speech.”

The Iowa law says people who lie to gain access or employment at a farm operation, with an intent to take action not authorized by the owner, could be charged with a serious misdemeanor, potentially carrying a year of jail time.

Additional violations are considered an aggravated misdemeanor, carrying up to two years of jail time.

Groups have argued the state gag law stifles employees from reporting wrongdoing as well as outside investigations.

"I'm grateful that the court … will stop the state from making it a criminal action for entities that publish the truth and shine a spotlight on activities that are of deep interest to the people of Iowa," said Randy Evans, executive director of the Iowa Freedom of Information Council.

Adam Mason, state policy director at Iowa Citizens for Community Improvement, said gag has prevented agricultural workers from speaking up about unsafe work conditions and environmental abuses.

Workers "feared exposing pollution as it occurred across the state," Mason said.

Tidgren said agriculture leaders may have valid concerns for wanting to restrict undercover activities that may harm their business, but it will be difficult to craft a law to protect them.

Federal courts have struck down similar laws in Idaho, Utah and Wyoming. Litigation is ongoing in North Carolina.