A federal judge struck down Idaho’s “ag-gag” law Monday, overturning the state’s law which banned the undercover filming of animal abuse at agricultural facilities. U.S. District Court Judge B. Lynn Winmill ruled the law was unconstitutional and violated the First Amendment of the U.S. Constitution.

“(The law) seeks to limit and punish those who speak out on topics relating to the agricultural industry, striking at the heart of important First Amendment values. The effect of the statute will be to suppress speech by undercover investigators and whistleblowers concerning topics of great public importance: the safety of the public food supply, the safety of agricultural workers, the treatment and health of farm animals, and the impact of business activities on the environment,” Winmill wrote in his 28-page decision. “The court finds that (the law) violates the First Amendment right to free speech. In addition, the Court finds that (it) violates the Equal Protection Clause because it was motivated in substantial part by animus towards animal welfare groups, and because it impinges on free speech, a fundamental right.”

The Idaho Dairymen’s Association drafted and sponsored the law last year in response to a video shot by Los-Angeles-based animal rights group Mercy For Animals that depicted employees at an Idaho agricultural facility abusing cows. The law, which sought to criminalize this type of undercover activity, was swiftly passed through the state Legislature and signed by Idaho Governor Butch Otter on Feb. 14, 2014. According to the Associated Press, those caught surreptitiously filming agricultural operations under the law faced up to a year in jail and a $5,000 fine.

The Animal Legal Defense Fund challenged the law as unconstitutional, alleging it stifled public debate about modern agriculture by criminalizing these types of undercover or whistleblowing investigations. Other states have drafted and passed similar “ag-gag” laws, though the Idaho law is the first to be struck down in federal court. “Audio and visual evidence is a uniquely persuasive means of conveying a message, and it can vindicate an undercover investigator or whistleblower who is otherwise disbelieved or ignored,” Winmill wrote.