DES MOINES, Iowa (AP) — The state of Iowa is appealing a federal judge’s ruling last month that found unconstitutional a 2012 law that made it illegal to get a job at a livestock farm to conduct animal cruelty undercover investigations.

Iowa Attorney General Tom Miller filed a motion Wednesday to appeal the case to the Eighth Circuit U.S. Court of Appeals.

Last month, a federal judge sided with opponents who sued in October 2017 to challenge the law intended to stop organizations like People for the Ethical Treatment of Animals from conducting undercover investigations at farms and puppy mills.

The judge found the law violates the First Amendment’s right to free speech.

Federal courts have struck down similar laws in Idaho, Utah and Wyoming.