A U.S. appeals court on Aug. 5 said the Dakota Access Pipeline (DAPL) does not have to be shut and drained per a lower court order, but a legal battle continued over the permit that allowed the line to be finished.

U.S. regulatory officials may still need to issue another environmental assessment for DAPL before deciding if the 570,000-bbl/d oil pipeline can keep operating, the U.S. Court of Appeals for the District of Columbia said.

In July, the U.S. District Court for the District of Columbia ruled the U.S. Army Corps of Engineers violated federal environmental law when it granted an easement to Energy Transfer LP to construct and operate a portion of the pipeline beneath South Dakota's Lake Oahe, a crucial drinking-water source for the Standing Rock Sioux tribe.

That judge said DAPL, controlled by Energy Transfer, would have to shut by Aug. 5. The appeals court decision allows the pipeline to remain running. The appeal will continue but a separate panel of judges will preside over it, lawyers said.

"We will need to run the course with this litigation," Energy Transfer's chief legal counsel Tom Mason said on a company earnings call. "We believe our legal positions are strong, and we are confident that the pipeline will continue to operate."

The district court must make additional findings before the pipeline can be shut, said Earthjustice attorney Jan Hasselman, who represents the Standing Rock Sioux.

"The bottom line is that the fight continues. We're right on the law and we're not giving up until this pipeline is shut down," Hasselman said.

Energy Transfer shares ended up 3.5% to $7.15.

DAPL's construction spurred months-long protests by activists and Native American tribes that culminated in violent clashes between demonstrators and law enforcement. It came into service in mid-2017.

Dakota Access says it could lose billions of dollars if the line was idled for an extended period.

Energy Transfer said it was moving ahead with a plan to expand the pipeline's capacity to as much as 1.1 million bbl/d.

Dakota Access says it could lose billions of dollars if the line, the biggest crude oil pipeline running from North Dakota's shale basin to the Midwest and Gulf Coast refineries, was idled for an extended period.