TORONTO — After four years of trade clashes, unpredictable foreign policy and insults lobbed at the prime minister by tweet, Canadian officials are optimistic that the inauguration of President-elect Joe Biden will mean a return to traditionally close relations between Canada and the United States

But this week, they were dealt a stinging reminder that Biden will also bring the return of more familiar bilateral irritants — including the difference over a project that a former U.S. ambassador to Canada once described as a “toe stubber”: the Keystone XL pipeline.

Biden’s plans to quickly terminate the project were greeted with disappointment in Canada’s prairie provinces and in Ottawa, even if they could not have been a surprise. Biden pledged to shut down the pipeline during the campaign as part of his green agenda, but Canadian officials hoped they would still have a chance to catch his ear and change his mind.

“All we ask at this point is that President-elect Biden show Canada the respect to actually sit down and hear our case about how we can be partners in prosperity, partners in combating climate change, partners in energy security,” Alberta Premier Jason Kenney, a member of the United Conservative Party, told reporters Monday. “Surely, the relationship between Canada and the United States is worth at least having that discussion.”

Liberal Prime Minister Justin Trudeau, who also supports the project, raised the controversial pipeline with Biden in a Nov. 9 phone call, according to a Canadian readout that said he looked forward to “engaging” on that issue, among others. (A Biden readout omitted that detail.)

“We’ve had a clear and consistent position supporting this project for years,” Trudeau told reporters Tuesday. “Our government is making sure that Canada’s views are heard and considered by the incoming administration at the highest levels.”

Eric Miller, president of the Washington-based Rideau Potomac Strategy Group, said the move is a reminder for Canadians that “the imperatives of U.S. politics tend to outweigh considerations of Canada’s interests.”

“It’s an unfortunate way for the Canada-U.S. relationship in the Biden era to get underway,” he said. “There are some who have argued that perhaps it’s better if they’re going to do it, to take the Band-Aid off right away, but it’s an unfortunate development and certainly will have reverberations in terms of the signals that it sends.”

The pipeline developed by Calgary, Alberta-based TC Energy, which would transport roughly 830,000 barrels a day of crude from Alberta to Nebraska and then to Gulf Coast refineries, has been an area of friction between the United States and Canada since it was proposed more than a decade ago.

Canadian regulators approved the project in 2010, but it quickly became mired in legal challenges and opposition from a wide range of groups, including Indigenous people and environmentalists, on both sides of the border.

President Barack Obama’s opposition to the project was a sore point in his relationship with then-Prime Minister Stephen Harper. Bruce Heyman, a U.S. envoy during Obama’s presidency, wrote that it touched off an “ice age” in relations that took years to thaw.

For Trudeau and President Trump, who resuscitated the project via executive order, it was one of a handful of files on which they were aligned.

Biden’s plans pose a particular challenge for landlocked Alberta, which has the world’s third-largest reserves of crude but struggles to get it to markets abroad because of a shortage of pipeline capacity that has left its product trading at a discount to global benchmarks.

The news is a particular gut punch for Kenney, whose approval ratings have plummeted amid budget cuts and his response to the pandemic. His government bought a $1.1 billion equity stake in the Keystone XL pipeline last March and guaranteed $4.2 billion in loans to finance its construction.

At the time, he described the pipeline as a “solid bet,” but critics said it was a risky gamble because its fate was largely contingent on legal and political decisions made in another country. He said this week that his government is considering legal challenges.

The news is also something of a headache for Trudeau, who came to power in 2015 insisting that it was possible to take aggressive action on climate change while also protecting Canada’s struggling oil and gas sector.

He has taken heat from both sides. Environmentalists labeled him a hypocrite after his government bought the Trans Mountain pipeline in 2018. Oil-rich Alberta and Saskatchewan signaled their discontent at the ballot box in 2019, shutting the Liberals out in a sign of deepening regional divisions.

Miller cited Biden’s “Buy America” provisions and seemingly unending disputes over softwood lumber as other potential bilateral irritants. He said Canada will hope for cooperation on efforts to free two Canadians detained in China in apparent retaliation for Canada’s arrest of a Huawei executive wanted in the United States on fraud charges.

Miller said Canadian officials will be keen to avoid letting the Keystone decision “derail the whole relationship.”

Trudeau said he’s “really looking forward” to working with Biden administration. “This moment will mark a new chapter in the incredible relationship between our two countries,” he said.