This story was originally published by Mother Jones and appears here as part of the Climate Desk collaboration

After four years locked in legal struggle over the construction of the controversial 1,172 mile-long, Dakota Access Pipeline, the Standing Rock and Cheyenne River Sioux tribes won a major victory on Monday when a federal court ordered the pipeline to cease its operations by August 5. Judge James E. Boasberg, from the US District Court of the District of Columbia, ruled that the US Army Corps of Engineers—tasked with awarding the permits for construction—failed to fully assess the environmental risks posed by a segment of the pipeline. The tribes argued the segment, which runs under Lake Oahe, a large reservoir half a mile from Standing Rock Reservation land, has both despoiled sacred land and contaminated their water supply.

“Fearing severe environmental consequences,” the ruling states, “American Indian Tribes on nearby reservations have sought for several years to invalidate federal permits allowing the Dakota Access Pipeline to carry oil under the lake. Today they finally achieve that goal—at least for the time being.”

“Today they finally achieve that goal—at least for the time being.”

At the heart of the ruling is the Environmental Impact Statement (EIS), an assessment that the Corps is supposed to conduct when serious questions arise around potential environmental consequences of a proposed project.

According to the ruling, the corps handed Dakota Access, LLC the permits it needed to construct the pipeline under Lake Oahe without bothering to create an EIS, despite long-standing environmental concerns. “The Corps has thus violated NEPA by determining that an EIS was unnecessary even though one of the EIS-triggering factors was met,” notes the ruling. To resume operations pipeline operations, the Corps will need to prepare an EIS, which by its own estimate will take until summer of 2021. In the meantime, the flow of oil will trickle to a halt and the pipeline will be emptied.

Boasberg’s order is sure to be a major blow to Kelcy Warren, the Trump-supporting CEO of Energy Transfer Partners LP, the company behind the pipeline and Dakota Access, LLC. As Bloomberg reports, “The Energy Transfer founder has stood by the project, going so far as to say he talks about Dakota Access ‘like I talk about my son.'” Since then, Warren has hosted a campaign fundraiser for Trump’s 2020 campaign.

In 2017, when he became president, Trump pushed for completion of the project, which had been stalled during the closing days of the Obama administration. As my colleague Nathalie Baptiste reported in 2017, “Indigenous activists and their allies began fighting the pipeline in 2015, but their most serious set back took place immediately after the inauguration when President Trump signed executive orders to advance approval of the pipeline.”

The completion of the EIS next year, might mean that the pipeline’s operations will resume. Still, the ruling represents a major breakthrough for the tribes and activist groups that have protested the pipeline since its inception. “Today is a historic day for the Standing Rock Sioux Tribe and the many people who have supported us in the fight against the pipeline,” said Mike Faith, chairman of the Standing Rock Sioux Tribe “This pipeline should have never been built here. We told them that from the beginning.”