A federal court ruled Monday that the Dakota Access Pipeline must shut down within 30 days, by Aug. 5, according to a copy of the brief obtained by USA Today.
The U.S. District Court for the District of Columbia scrapped a key permit from the Army Corps of Engineers, and ordered the pipeline to end its three-year run of delivering oil out of North Dakota's Bakken shale basin to its endpoint in Illinois. The decision marked the end of a yearslong legal battle over the Energy Transfer Partners-owned pipeline's environmental damage to the Missouri River.
President Donald Trump granted the permit in 2017 over the objections of the Standing Rock Sioux Tribe and environmental activists, arguing oil spills could contaminate their water source and put their culture at risk.
The court ruled the pipeline be shut down pending a full environmental review ordered previously.
"The Corps had failed to produce an Environmental Impact Statement despite conditions that triggered such a requirement," the court ruling said. "Although mindful of the disruption such a shutdown will cause, the Court now concludes that the answer is yes."
"Given the seriousness of the Corps' NEPA error, the impossibility of a simple fix, the fact that Dakota Access did assume much of its economic risk knowingly, and the potential harm each day the pipeline operates, the Court is forced to conclude that the flow of oil must cease," the ruling said.
A spokesperson at Energy Transfer Partners told CNBC the pipeline is "the safest, most environmentally responsible method for moving North Dakota's crude oil to refining markets around the country."
"Shutting down this critical piece of infrastructure would throw our country's crude supply system out of balance, negatively impact several significant industries, inflict more damage on an already struggling economy, and jeopardize our national security," the spokesperson said. "This was an ill-thought-out decision by the Court that should be quickly remedied."
Subscribe to CNBC PRO for exclusive insights and analysis, and live business day programming from around the world