In what would seem a rare—if qualified—victory over the livestock industry in one of its bastions, a federal court in North Carolina has ruled that a lawsuit against an industrial pig farm in the state can proceed. The suit, brought by the Humane Society of the United States and a local nonprofit group, alleges the giant farm, with a capacity of more than 8,000 pigs and operated by the Hanor Company of Wisconsin, has been violating federal law by failing to report its ammonia emissions.

That this is news just goes to show the sorry state in which we find ourselves when it comes to regulating factory farms. Yes, North Carolina is an epicenter of factory farming; in some counties, hogs outnumber people 30 to one. Getting a judge there to issue any sort of ruling against the livestock industry would seem about as heroic as persuading the local town council to offer a vegetarian alternative at its annual Fourth of July barbecue.

But let’s take a closer look at what the Hanor Company is fighting here. Hanor is saying that a Bush-era regulation exempting the largest factory farms, known as “confined animal feeding operations,” from reporting their emissions of nasty pollutants such as ammonia, hydrogen sulfide, and volatile organic compounds, which come from the enormous amounts of animals waste generated at these facilities, still applies some 11 years after the fact—and Hanor may be right. The presiding judge didn’t buy that argument this time around but may when the lawsuit goes to court.

So what’s in dispute is whether factory farms are legally obligated simply to report the amount of air pollution they’re spewing into the air, not whether they’re required to do anything about all that pollution.

Any number of unsuspecting Americans innocently chowing down on poolside hot dogs this summer might be surprised to learn that despite the rampant proliferation of industrial-scale factory farms across the country (a 250 percent increase in the past 25 years), the federal government has done little to nothing to address the staggering amount of pollution these facilities generate. While the Environmental Protection Agency has estimated the nation’s factory farms produce three times the amount of solid waste people do, it doesn’t even have an idea of where all those facilities are.

The Humane Society, along with a number of other animal-rights and environmental groups, has been badgering the EPA for years to get off its duff and do something about the inevitable pollution to both air and water that results when an industry has to find some expedient, low-cost way to get rid of more than 500 million tons of animal manure each year. The groups have hauled the agency to court a number of times—so far, to no avail.

Meanwhile, CAFO operators tend to pool all that animal waste into big lagoons and let nature take its course. The industry asserts that, after a while, bacteria take care of all the potential pathogens, and the manure is turned into fertilizer that can be sprayed onto fields. Yet, not only has the ensuing deluge led to reports of all that nutrient-rich runoff pouring into rivers and lakes to create algae-choked dead zones, but certain harmful pollutants can become airborne, threatening the health of nearby residents in what are often small, economically disadvantaged rural communities. As one local North Carolina resident put it to Bloomberg Businessweek last year, “EPA needs to do what it should do, because we’re living with this on our land.”