The Dakota Access pipeline can continue operating during a new federal review of the project’s environmental impact, a federal judge ruled on Wednesday.

U.S. District Judge James Boasberg said he would not vacate a previous permit while federal regulators conduct a new environmental review into the 1,170-mile pipeline.

Boasberg in June ruled that the Army Corps of Engineers’ review of the project was inadequate before it granted the permits necessary to build the pipeline, which transports oil near Native American reservations in North Dakota on its way to Illinois.

ADVERTISEMENT

But in a 28-page ruling issued Wednesday, he said the deficiencies in that review “are not fundamental or incurable flaws” and that the corps has such a “significant possibility of justifying its prior determinations” that the pipeline can continue operating.

Boasberg ruled that the government’s review “cannot be reduced to a bureaucratic formality" and suggested he will reconsider “whether [regulators] have in fact fulfilled their statutory obligations” should legal challenges arise after the review is complete.

“The dispute over the Dakota Access Pipeline has now taken nearly as many twists and turns as the 1,200-mile pipeline itself,” he wrote.

Dakota Access, which has a capacity of 470,000 barrels per day, has been operating since June. Developers and the federal government have argued against shutting it down during the new review, which officials last week said could stretch into next spring.

Wednesday’s order is a victory for Dakota Access and the Trump administration, which supports the project. It’s a defeat for the Standing Rock Sioux and Cheyenne River Sioux tribes, which have waged a lengthy legal campaign against the pipeline.

The tribes say Dakota Access threatens water supplies and sacred sites on the North Dakota prairie. Developers have argued the pipeline is safe and follows existing oil and natural gas infrastructure.