“This is a a very significant victory and vindication of the tribe’s opinion,” said Jan Hasselman, the lead attorney for the case and an employee of Earthjustice, an environmental-advocacy group that represented the Standing Rock Sioux.

“The court slices things pretty thin, but there were three major areas that he found deficient, and they’re not insignificant. They’re central to the problems that we’ve been highlighting the whole time,” Hasselman told me.

Energy Transfer Partners, which owns and operates the pipeline, did not respond to a request for comment before publication. A representative for the U.S. Army Corps of Engineers could not be reached.

The Dakota Access pipeline runs 1,100 miles across much of the Great Plains, connecting the Bakken oil formation in North Dakota to a refinery and second pipeline in Illinois. Oil began flowing through the pipeline earlier this month.

The pipeline became a rallying point for both climate activists and indigenous civil-rights advocates last year, as thousands of people—many of them Native Americans—gathered on the Standing Rock reservation to protest and physically obstruct the pipeline’s construction. By late October, Standing Rock had become the largest and most high-profile Native protest in the United States in four decades.

Boasberg’s ruling centered on two ways that the Corps’s environmental study was inadequate. First, he said, the Standing Rock Sioux are assured certain hunting and fishing rights in their most recent treaty with the U.S. government. Many of the tribe’s members rely on fish or hunted game as a steady food source.

Before approving the pipeline, the Corps did not study whether an oil spill at the pipeline would kill most of the river’s fish. It also did not report on whether the chemicals used to clean up a spill could poison local game, rendering them unfit for human consumption

“Even though a spill is not certain to occur at Lake Oahe, the Corps still had to consider the impacts of such an event on the environment,” the judge said.

This emphasis on consideration points to the broader nature of the legal fight: This case is not about how the pipeline may harm Standing Rock, but whether the Corps adequately studied and reported on those harms before approving it in the first place. Most environmental-law cases in the United States are fought on this kind of procedural territory—it’s a a product of the National Environmental Policy Act of 1970, which mandates the government study the environmental effects of any decision it makes but does not require it to make especially green decisions.

Boasberg’s second complaint with the Corps was on similar methodological grounds. According to federal regulation, every major project constructed near a poor community, community of color, or Native American reservation must be studied on environmental-justice grounds. The Corps shrugged off many of these rules, arguing that no affected group lived within a half-mile of the pipeline route.