Protesters gather near Standing Rock, North Dakota, in 2016 to protest the Keystone XL pipeline project.Credit: Andrew Lichtenstein/Corbis/Getty

A US judge in Montana has blocked construction of the Keystone XL pipeline — which would enable shipments of oil from the tar sands of Alberta, Canada, to refineries along the Gulf of Mexico.

The administration of US President Donald Trump failed to review the project’s environmental impacts properly before issuing a permit for the pipeline, the federal-court judge said in a ruling on 8 November.

He added that the administration had “simply discarded” the Keystone XL pipeline’s potential impacts on greenhouse-gas emissions and climate change, rather than justifying its decision to allow the project to move forwards.

Former president Barack Obama had rejected the controversial project in 2015 after a lengthy analysis suggested that it would increase greenhouse-gas emissions.

After Trump took office in 2017, he signed executive orders reviving the pipeline. The Department of State issued a permit for the project in March 2017, but environmentalists and Indigenous-rights groups challenged the decision in federal court.

It’s unclear whether the Trump administration or TransCanada — the company backing Keystone XL — will appeal against the 8 November ruling.