A federal American judge has blocked the construction of the controversial Keystone XL oil pipeline, linking Canada's oil sands to US refineries, saying that the US government had not completed an environmental analysis.
The project, which became a target for campaigns and was rejected by Barack Obama's administration after many years of discussions to continue was approved by President Donald Trump.
Thursday's decision is a victory for environmental and indigenous peoples rights groups that have campaigned for crude oil extraction due to its impact on local landscapes and greenhouse gas emissions.
It also causes a major setback for TransCanada, which again has to delay the construction of the 8 billion dollar pipeline, extending almost 2000 km from Alberta to Nebraska.
US court judge Brian Morris violated Trump's permission following a lawsuit filed by environmental groups against the US government.
He said the management analysis "fell out" on the impact of greenhouse gas emissions and oil emissions from the project, as well as the viability of Keystone XL, given current oil prices.
Nebraska regulators approved the construction of Keystone XL in November 201
President Obama in 2015 blocked it, believing that the oil sands project would have undermined American efforts to urge to cope with the threat of global warming caused by fossil fuels.
The judge also said a proper justification for the government's change from rejecting the pipeline by 2015 to approve it two years later under Mr Trump was not given. Extensive analysis related to the impact of climate change was "omitted" from any new study, he said.
The Trump Administration "rejected previous facts related to climate change to support the change of course," he added. "An agency can not just disregard contradictory or inconvenient factual provisions."
The pipeline, demanded by US republics, was expected to open a new export route from western Canada. Mr Trump said that it would create jobs, lower fuel prices and reduce dependence on foreign oil.