US President Donald Trump has granted a new permit for construction of the Keystone XL pipeline, a controversial project that would bring oil from Canada to the US.

The XL project, a crucial segment in a network of pipelines linking Canadian oil fields to US refineries on the Gulf Coast, was blocked in November by a US federal judge.

Trump's action, issued Friday and posted online by the White House, gives Canadian company TransCanada permission to "construct, connect, operate and maintain pipeline facilities" at the international border in Phillips County, Montana.

It supersedes a previous permit that Trump had issued in March 2017.

TransCanada thanked Trump.

"The president’s action today clarifies the national importance of Keystone XL and aims to bring more than 10 years of environmental review to closure," it said.

It was not clear Saturday if, under the new permit, the project must also undergo new environmental impact studies.

The project has been fiercely opposed by environmentalists and indigenous groups because of the risk of oil spills and damage to sites considered sacred.

The XL portion of the pipeline calls for construction of a segment from Alberta, Canada to the Midwestern US state of Nebraska, creating a more direct route to the Gulf refineries.

The administration of Barack Obama blocked the project in 2015, citing the environmental risks.

And in blocking the project last November, US District Judge Brian Morris questioned whether a State Department analysis of the project's cumulative impact on greenhouse gases and Native American land had been sufficiently rigorous.

The State Department had concluded that completing the pipeline was in the national interest of the United States.

The Canadian government also has forcefully advocated for the project, saying the added capacity was needed to relieve an oversaturated pipeline network.