Canada’s TC Energy Corp. and the Albertan provincial government said Wednesday they would scuttle the Keystone XL oil pipeline project, bringing to an end a decadelong controversy over an effort to pipe more Canadian crude to the U.S.

The decision had been expected after President Biden used his first day in office to revoke a key permit for the pipeline to cross the country’s northern border, shutting down construction.

It is a win for environmentalists who have campaigned to block new pipeline construction as a way to limit oil consumption that contributes to global warming.

Write to Timothy Puko at tim.puko@wsj.com