Wyoming lawmakers adopted legislation in 2015 making it illegal to gather data on open lands for the purpose of reporting harmful farming practices, environmental degradation, or other ills. That includes performing water quality tests or taking photographs. Fearing constitutional concerns, the state legislature amended the law last year to say virtually the same thing but with a caveat: it's illegal to do such gathering if the observer does it from private property or had to cross private property first before entering public lands to do their investigation.

And a federal judge bought it and said there was nothing unconstitutional about the ag-gag law because, you know, trespassing is an illegal act.

Conservation and animal rights groups took the decision to a federal appeals court. Days ago, the appeals court put that lower court's decision on life support. The 10th US Circuit Court of Appeals said the ordinance stifles speech, particularly speech necessary for public discourse about environmental and animal safety regulations.

"An individual who photographs animals or takes notes about habitat conditions is creating speech in the same manner as an individual who records a police encounter," the Denver-based court concluded. (PDF)

The Wyoming legislation forbids state regulators from even acting upon evidence of environmental or animal wrongdoing if the data was gathered by somebody who had trespassed on private property. The legislation was crafted after the Western Watersheds Project, a plaintiff in the suit, collected data that revealed water pollution and federal grazing violations.

The appeals court didn't kill the legislation altogether. It ordered a lower court to decide whether the law could survive even if the measure restricts free speech.

For the lower courts to side with Wyoming, a judge would have to agree that protecting trespassing laws serves a greater governmental interest than protecting free speech when it comes to reporting on agribusiness pollution and animal rights.

"We conclude that plaintiffs collection of resource data constitutes the protected creation of speech," the appeals court wrote when sending the case back to the lower courts.

The reason the appellate court remanded to the lower court was because the lower court had not performed this so-called balancing test. The lower court said there was no constitutional right to trespass and stopped at that.

"We think it the better practice to remand to allow the district court to consider those issues in the first instance," the appeals court wrote.

Environmentalists (including Natural Resource Defense Council attorney Michael Wall) said there was no way that the law will be upheld after US District Judge Scott Skavdahl in Casper performs the ordered balancing test.

"It's pretty clearly unconstitutional," Wall said.

Ag-gag laws have been around since the 1990s. They remain on the books in several states, including Montana, North Dakota, Missouri, Kansas, Iowa, and North Carolina. The measures were introduced in the wake of published videos that led to the bankruptcies of packing plants, a tightening of farming practices, and the boycotts of McDonald's, Target, Sam's Club, and other retailers.

In July, a federal judge overturned Utah's so-called "ag-gag" ban on filming private agribusiness and slaughterhouse operations without permission. US District Judge Robert Shelby said the measure, enacted in 2012, violated the First Amendment.