Cenovus Energy Inc. is getting more than just a rival Canadian oil producer with its acquisition of Husky Energy Inc. It’s also shoring up its defenses against an anti-oil sands movement that could get a boost if Joe Biden is elected as the next president of the U.S.

Calgary-based Cenovus said Sunday morning it’s reached a CUS$3.8 billion (US$2.9 billion) all-share deal to buy Husky, which is controlled by Hong Kong billionaire Li Ka-shing. Li and his CK Hutchison Holdings Ltd. will own about 27 per cent of the combined firm if the deal goes through.

Oil sands companies in Alberta sell their crude at a discount to West Texas Intermediate because export pipelines are usually too full to accept all the oil that producers want to ship. That discount can be steep at times -- US$20 a barrel or more -- and is currently more than US$10.

The situation could get worse if Biden wins the Nov. 3 election and makes good on his promise to rescind the permit granted by President Donald Trump for the development of Keystone XL, the biggest of three major Canadian export pipelines under construction.

By acquiring Husky’s refineries in Ohio and Wisconsin, Cenovus will reduce its exposure to that problem. The merged company will be able to refine as much as 70 per cent of its crude directly in the U.S. Midwest, the biggest market for Canadian crude, meaning the company won’t have to sell as much oil locally at depressed prices.

“Our firm view is that Keystone is not going to be built,” Jeffrey Craig, an analyst at Toronto-based Veritas Investment Research Corp., said of the proposed 830,000-barrel-a-day line from Alberta to Nebraska. Access to Husky’s heavy-oil refineries is “probably the biggest reason to do this deal,” he said.

Investors did not react positively Monday, with Cenovus shares falling nearly 15 per cent at one point. They were down more than 8 per cent to CUS$4.47 as of 1:46 p.m. in Toronto. Husky shares rose 13 per cent to CUS$3.57.

The acquisition will make Cenovus more like rivals Suncor Energy Inc. and Imperial Oil Ltd., which have larger refining businesses and are therefore less exposed to pipeline risk.

As concern about climate change has increased, Canada’s oil sands companies have faced criticism about the carbon emissions produced from mines and steam-injected wells in northern Alberta. In alliance with some indigenous groups, environmentalists have gone to court to stop pipelines and, more recently, appealed directly to banks not to fund projects.

The region’s carbon footprint has become an issue for investment firms that are growing more concerned with the environmental and social risks taken by the companies they own. Norway’s massive wealth fund, for example, cut its holdings of Canadian oil sands stocks, including Cenovus and Suncor.

Environmentalists’ efforts have partly paid off. Keystone XL’s future remains in doubt 12 years after it was first proposed by TC Energy Corp. The Trans Mountain pipeline expansion to Vancouver and Enbridge Inc.’s Line 3 are under construction, but only after years of delays that brought new oil sands development to a near halt.

For Cenovus, the Husky deal means that pipeline risk “has been materially decreased,” Chief Executive Officer Alex Pourbaix said on a conference call Sunday. “I’ve been talking to investors for three years, telling people I was optimistic the pipes were going to come.”

Two years ago, Alberta’s government was forced to impose output limits on producers when oil sands production overwhelmed pipeline capacity, causing a glut of crude to form in Western Canada that temporarily depressed local prices to discounts as large as US$50 a barrel.

Those limits are due to be lifted in December after the collapse in oil demand caused by the COVID-19 pandemic prompted the industry to shut in some production.