A federal judge ruled Wednesday that the Dakota Access Pipeline (DAPL) may continue to operate, keeping the oil flowing while the government completes a court-ordered environmental review.

The highly anticipated decision is a win for Energy Transfer Partners (ETP), the company that runs the pipeline, and a significant blow to the Standing Rock Sioux, who had hopes that the judge might have shut down the pipeline until the review could be complete. For over a year, the tribe has been waged in a legal battle against the DAPL, which crosses under Lake Oahe, the tribe's main water supply, arguing that an oil spill could have potentially disastrous effects on the community.

"This pipeline represents a threat to the livelihoods and health of our Nation every day it is operation," said new Standing Rock Sioux chairman, Mike Faith, who was inaugurated the same day the decision came in. "It only makes sense to shut down the pipeline while the Army Corps addresses the risks that this court found it did not adequately study."

In his 28-page decision, US district court judge James Boasberg wrote, "The dispute over the Dakota Access Pipeline has now taken nearly as many twists and turns as the 1,200-mile pipeline itself." Back in June, Boasberg ruled that the US Army Corps of Engineers did not sufficiently evaluate the environmental impact of the pipeline, particularly "impacts of a spill on hunting rights, fishing rights and environmental justices," with respect to the tribe, according to court papers. He ordered the corps to redo its Environmental Assessment (EA).

At stake in this latest decision was whether the judge would decide to vacate the Corps' initial EA entirely, therefore vacating the easement granted to ETP. Without the easement, the pipeline would be forced to shut down. But in the court's view, there is a strong possibility that the findings of the new EA will support the previous version.

"The Corps must simply connect the dots. This, then, is not a case in which the agency 'must redo its analysis from the ground up,'" Boasberg wrote. "Correcting this flaw does not require that Defendants (the Corps) begin anew, but only that they better articulate their reasoning," he said in court papers. The agency, according to court papers, addressed the impact that construction had on wildlife, but not the impact of a spill. Boasberg called those gaps "improper," but not "incurable."

"I think this decision turns the law on its head," said Jan Hasselman, an attorney with Earthjustice who is representing the tribe. "The National Environmental Policy Act (NEPA) is a requirement to look before you leap. Before the government makes major decisions with significant implications, it needs to understand what those implications are. But with DAPL, the court has allowed them to act first and study later and that's not the way it's supposed to work."

The controversial pipeline has been transporting oil since June. Before its completion, it was the subject of massive protests and an encampment that drew Native Americans and activists from all over the country. Toward the end of Barack Obama's term, the Army Corps denied the easement under Lake Oahe and construction was temporarily halted while the Army Corps explored alternate routes. But after Donald Trump took office, that decision was quickly reversed—but the tribe continued to fight.

Boasberg wrote in his June ruling that the corps also failed to evaluate how the pipeline might disproportionately affect a minority community—the "environmental justice" impact. (In its initial analysis, the Corps looked at another potential route north of Bismarck.) While Boasberg reiterated that point in yesterday's ruling, it was not a compelling reason to shut down the pipeline in the court's view.

"There is no doubt that our nation's history is replete with examples of Native American tribes bearing the brunt of government action," he wrote. "Yet the Court's role here is not to determine the wisdom of agency action… Instead, it must consider only the Corps' likelihood on remand of fulfilling NEPA's procedural environmental-justice requirements and justifying its prior decision."

For Hasselman, the environmental justice issue "cuts at the very heart of what motivated people to go stand out in a field in the middle of North Dakota." Despite the options for alternate routes, the choice was made, she said, "to put all of the risk at the tribe's doorstep instead of a wealthier, non-Native community upstream."

In court papers filed last week, the corps said the EA will take months longer than they originally projected, and is estimated to be complete in April, instead of by the end of this year. The hold-up is due in part to information the Corps is waiting for from the oil company. Dakota Access has told the corps "that certain spill modeling cannot be completed until early December," according to court documents. Which begs the question: What, if any spill modeling was done before construction?

"It's shocking," Hasselman told me. "They (the Corps) want information about oil spill risk. Are you kidding me? They haven't looked at it yet—that 's the whole point. They just took Dakota Access' promise that the risks were low and they rubber-stamped them. To me, this reflects an admission that they never really looked at the spill risks."

ETP did not respond to calls and emails requesting comment.

If the EA shows no significant environmental impact, according to court papers, the corps may forego the more comprehensive Environmental Impact Statement (EIS), which can sometimes take years to complete. As that process takes place, the pipeline would continue to operate.

Unless the corps pushes the date further past the projected April 2018 deadline (a concern that Hasselman told me is on the tribe's radar), the tribe's lawsuit will pick back up in the spring.

"From the very beginning of our lawsuit, what we have wanted is for the threat this pipeline poses to the people of Standing Rock Indian reservation to be acknowledged," said Faith. "Today, our concerns have not been heard and the threat persists."