Energy company TC Energy and the Canadian province of Alberta are halting construction of the controversial Keystone XL pipeline, which was supposed to transport crude oil from Canada's tar sands fields to the southern United States.

The company and the provincial government announced this on Wednesday.

The immediate reason is the withdrawal of the license by US President Joe Biden in January.

According to him, the pipeline contributes to climate change and has harmful effects on the environment.

It was one of his first decisions as president.

Canadian Prime Minister Justin Trudeau regretted that decision, but was unable to convince his American colleague to grant the permit in recent months.

The project has been haggled over for years and construction has been postponed several times.

President Obama, among others, stopped the pipeline because of opposition from environmental groups.

Construction began last year when former President Donald Trump gave his approval.

Since then, more than 150 kilometers of the planned 1,930 kilometer pipeline from Alberta to the southern United States had already been built.

The province says it has invested more than 1.3 billion Canadian dollars (almost one billion euros) in the project.

The pipeline would send more than 830,000 barrels of crude oil from Canada's tar sands fields to refineries in the US every day.

The pipeline could potentially create thousands of jobs in both countries.

In the US, 21 states have sued the federal government for revoking the license.