BOISE (KTVB) - A federal judge has ruled that Idaho's law banning secret filming of animal abuse at agricultural facilities is unconstitutional.

U.S. District Court Judge B. Lynn Winmill ruled Monday the law violates the First Amendment.

A coalition of animal activists, civil rights groups and media organizations sued the state more than a year ago, opposing the so called "ag gag" law. The coalition said the law curtailed freedom of speech and made gathering proof of animal abuse a crime with a harsher punishment than the penalty for animal cruelty.

Idaho lawmakers approved the law in 2014 after the state's $2.5 billion dairy industry complained that videos of cows being abused at a southern Idaho dairy filmed in 2012 unfairly hurt their business.