A federal appeals court on Thursday threw out a lower court decision to halt construction of the Keystone XL pipeline. But several major obstacles remain to the controversial project's progress, ensuring that the much-delayed Keystone XL will likely not be built soon.

The Ninth Circuit Court of Appeals decision hands a victory, at least for now, to the Trump administration and tar sands oil interests that have sought to jump-start construction of the northern leg of the pipeline from Alberta to Nebraska.

President Barack Obama had decided in 2015 that Keystone XL should not be built, saying it wouldn't serve the U.S. national interest. But in one of his first acts in the White House, President Donald Trump signed an executive order reversing that decision and directing the State Department to issue a construction permit. The issue has been litigated ever since.

Sign up for InsideClimate News Weekly Our stories. Your inbox. Every weekend.

Last November, a federal district court judge in Montana stopped construction of the pipeline, ruling that the Trump administration had failed to fully take into account the pipeline's impact on the environment, including the climate. "The Trump administration "simply discarded prior factual findings related to climate change to support its course reversal," wrote Judge Brian Morris of the United States District Court for Montana.

In response, Trump scrapped the pipeline's State Department approval in March and issued in its place a new presidential permit for Keystone XL, arguing that such a permit, originating in the White House, does not need to abide by federal environmental reviews.

Keystone XL's owner, TC Energy, and the administration then appealed the Montana court's decision to the Ninth Circuit Court, asking the panel of judges to throw out the lower court's ruling since the State Department permit had been revoked.

The Ninth Circuit ruled in favor of the administration and the company.

"We are pleased with the ruling," said Matthew John, a spokesman for TC Energy, formerly known as TransCanada. "We look forward to advancing the project."

Jackie Prange, a senior attorney with the Natural Resources Defense Council, part of a coalition that sued to stop the pipeline, said in a statement that advocates are exploring "all available legal avenues" to halt Keystone XL.

Oil production from the tar sands, or oil sands, is among the most carbon-intensive, and environmental groups and landowners have opposed new pipeline infrastructure, both over the tar sands' impact on climate change and over the fear of oil spills. Two other pipelines connecting the Alberta tar sands region to refineries are facing challenges in Minnesota and Michigan.

Keystone XL Still Faces Legal Challenges

The appeals court ruling does not mean there will be speedy progress on the pipeline, which has been mired in legal challenges for a decade.

In March, TC Energy said it would not be able to begin construction this year because of uncertainty created by various lawsuits. One case still pending before the Nebraska State Supreme Court challenges the pipeline's latest planned route through the state. The project also still needs some permits from the Army Corps of Engineers and the Interior Department.

Opponents of Keystone XL have successfully stymied the project's completion for years with legal challenges over threats to regional drinking-water aquifers, streams, wildlife habitat and the global climate.

Flooding Raises Another Risk in Nebraska

This spring's catastrophic flooding in Nebraska also highlighted risks the pipeline could face from erosion and from debris in rivers scouring the river beds that the pipeline would cross under.

The threat to pipelines from erosion prompted the Pipeline and Hazardous Materials Safety Administration, the federal regulator responsible for the safe operation of the country's energy pipelines, to issue an advisory a month ago to pipeline owners. It urged them to institute safeguards after a recent spate of accidents from soil shifting around pipelines.

In the last decade, fast currents and high floodwaters exposed two pipelines in the Yellowstone River in Montana that both ruptured, leaking a total of about 93,000 gallons of oil.