In a major victory for opponents of the controversial Dakota Access Pipeline, a federal judge ruled on Wednesday that prior environmental assessments failed to fully consider the impact of the project. The Army Corps of Engineers will now have to undertake a more thorough review.

The pipeline crosses the Missouri River just upstream from the reservation of the Standing Rock Sioux Tribe of North and South Dakota. The tribe gained international attention starting in the summer of 2016, as thousands flocked to the reservation in support of the tribe's opposition to the pipeline. The project was approved by the Trump administration and completed in June 2017.

It remains unclear however, whether the 1,200-mile pipeline, which ships crude oil from North Dakota to Illinois, will have to be shut down during the new assessment by the Corps, a process that could take years.

Sign up for Inside Clean Energy Inside the future of energy.

"This Court ultimately concludes that too many questions remain unanswered," Judge James E. Boasberg of the U.S. District Court for the District of Columbia wrote, in a ruling released Wednesday. "Unrebutted expert critiques regarding leak-detection systems, operator safety records, adverse conditions and worst-case discharge mean that the easement approval remains 'highly controversial' under NEPA [the National Environmental Policy Act]."

The Army Corps must now complete an Environmental Impact Statement, a detailed assessment of any potential environmental harms that might result from the project, for the portion of the pipeline that crosses beneath Lake Oahe, a dammed section of the Missouri River in North Dakota.

The tribe relies on water from Lake Oahe in "myriad ways," according to the ruling, "including for drinking, agriculture, industry and sacred religious and medicinal practices."

Standing Rock sued the Army Corps of Engineers in July 2016, arguing that an initial environmental assessment of the project the Corps had approved was inadequate. The Cheyenne River, Oglala and Yankton Sioux tribes later joined the lawsuit as plaintiffs.

"After years of commitment to defending our water and earth, we welcome this news of a significant legal win," Standing Rock Sioux Tribe Chairman Mike Faith said in a written statement.

Jan Hasselman, an attorney for Earthjustice, an environmental organization representing the tribe in court, said the decision validated concerns the tribe has expressed for years about the risk of oil spills from the pipeline.

"This is the second time the Court has ruled that the government ran afoul of environmental laws when it permitted this pipeline," Hasselman said. "We will continue to see this through until DAPL has finally been shut down."

Energy Transfer, the company that operates the pipeline, did not respond to a request for comment.

In addition to its initial environmental assessment, the Army Corps has also completed a supplement review ordered by Boasberg. Boasberg ruled on Wednesday that those prior assessments failed to address key concerns about potential spills from the pipeline.

"He gave the Corps the opportunity to fix what was wrong with the environmental assessment and they completely blew it," said Pat Parenteau, a professor at Vermont Law School. "I don't think they left judge Boasberg any choice."

Parenteau said the more complete environmental assessment that the judge has now ordered would probably take two years or more to complete—longer than usual because of the ongoing coronavirus pandemic.

The judge will now consider whether the pipeline should shut down during this time. Boasberg has asked the Corps and the tribes to submit written arguments by April 15 in regard to whether the pipeline should be allowed to remain open or shut down during the new environmental assessment.

In his ruling, Boasberg acknowledged that shutting the pipeline down would "carry serious consequences that a court should not lightly impose."

Parenteau said the tribes will face an uphill battle in getting the judge to shut down the pipeline during the new environmental assessment but added that he didn't rule out the possibility.

"I would have to assume he is seriously considering that," Parenteau said of a possible shutdown.