People for the Ethical Treatment of Animals and the Animal Legal Defense Fund say the Utah Legislature passed the measure with "animus" or hostility toward animal protection groups.

The statute "has no other purpose than to harm a politically unpopular group and shelter a single industry from political discourse and criticism," according to a response filed in federal court.

The groups defended their right to file the lawsuit, saying the threat of prosecution chills their ability to expose the "horrors" of factory farming and the injuries suffered by journalists and academics who report on them. They say the "vitriolic" rhetoric Utah legislators used against animal advocates in passing the law violates the equal protection clause of the Constitution.

Attorneys for the state asked a federal judge in October to throw out the lawsuit. They contend the animal rights activists, including a Salt Lake City woman who faced a criminal charge, don't have standing to challenge the law because they can't show an immediate threat of prosecution.

The state says the law does little more than provide protection to an industry and a small group of people who have been specifically targeted for surreptitious access and recording.

State lawmakers approved a bill in 2012 that makes it a class B misdemeanor to trespass on private livestock or poultry operations and record sound or images without the owner's permission. It also prohibits seeking employment with the intent of making those recordings. Leaving a recording device for that purpose is a class A misdemeanor.

The law does not criminalize the possession or distribution of unlawful recordings, but focuses on trespassing and filming while on the property, according to the state.

One of the plaintiffs, Salt Lake City resident Amy Meyer, was "the first and only person in the country" charged under an ag gag statute last February, according to the lawsuit.

Meyer filmed workers pushing what appeared to be a sick cow with a bulldozer at the Dale T. Smith and Sons Meat Packing Co. in Draper. She was standing on a public roadway when someone from the company told her she was not allowed to film, according to her attorney, Stewart Gollan, but Meyer responded that she was on public property.

Draper police later cited Meyer with agricultural operation interference, a class B misdemeanor. Draper prosecutors dropped the charge in April when Meyer showed the evidence that she didn't trespass on private property.