A demonstrator holds a ‘Water Is Life’ sign in front of the White House during a protest against the Dakota Access Pipeline in Washington, D.C.

A federal judge on Wednesday said an environmental review of the controversial Dakota Access Pipeline was inadequate, handing a last-minute victory to Native American tribes and environmentalists who have long opposed the project.

In a 91-page decision, U.S. District Court Judge James Boasberg said the Army Corps of Engineers, which gave its final approval to the oil project in February, “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 effect are likely to be highly controversial.”

Boasberg ordered the agency to conduct new reviews of those sections of its environmental analysis, but did not halt the use of the pipeline, which began flowing oil on June 1.

The Standing Rock Sioux tribe, which filed the lawsuit, called Wednesday’s decision a “significant victory.”

“The previous administration painstakingly considered the impacts of this pipeline, and President Trump hastily dismissed these careful…