A federal judge ruled Wednesday night that the environmental review for the $3.8 billion Dakota Access oil pipeline must be redone to assess the risk of an oil spill under Lake Oahe in North Dakota.

Tribal groups, which have tried to block the pipeline from crossing the lake for nearly two years, took U.S. District Court Judge James Boasberg's decision as a major victory in their fight. But the judge's order won't stop the pipeline from shipping oil 1,200 miles to Illinois.

The pipeline's supporters shrugged off the ruling, saying the judge's ruling "disposed of nearly all the Tribes' claims."

The "handful" of the pipeline opponent's claims that remain "do nothing to impact the ongoing operation of the pipeline nor do they undermine the work of the more than 8,000 individuals across the four states who built it," said Craig Stevens, spokesman for the Grow America's Infrastructure Now (GAIN) Coalition, representing backers of the project and infrastructure development.

"The Dakota Access Pipeline remains one of the safest – if not the safest – pipeline ever constructed," Stevens said. "And while we have little doubt that the [Army] Corps will ultimately be successful in satisfying the court's concerns, tonight's decision continues the public saga of the project and jeopardizes ongoing infrastructure investment."

Boasberg's 91-page opinion explained that the Army Corps of Engineers "did not adequately consider the impacts of an oil spill on fishing rights, hunting rights, or environmental justice, or the degree to which the pipeline's effects are likely to be highly controversial."

President Trump had ordered the Army Corps of Engineers to expedite the final approval process for the pipeline as one of his first actions on energy as president. Former President Barack Obama had placed a hold on the pipeline's final approval to conduct further environmental reviews, but Trump's January decision upended that activity.

The Standing Rock Sioux Tribe had led the fight on the ground and in the court's last year to prevent the pipeline from being built. The tribe argued that the several hundred feet of pipe that goes under Lake Oahe threatens the tribe's clean water supply due to the threat of a spill.

The pipeline's developer, Energy Transfer Partners, argued that the project had undergone all necessary environmental reviews under the law, and that it had attempted to work with the tribe to satisfy their concerns.