CALGARY — TC Energy Corp. has ended its 16-year quest to build the Keystone XL oil pipeline, the controversial cross-border project that became a litmus test for climate activism and was blocked by President Joe Biden.

Calgary-based TC Energy said in a statement it had formally terminated the project after consultation with the government of Alberta in Canada. It had already suspended construction on the project earlier this year, after Biden revoked a presidential permit for the project.

Keystone XL helped galvanize modern climate activism, uniting environmentalists in a battle against the project some described as a “climate dirty bomb.” It also shifted the course of American environmentalism from its roots struggles against nuclear power, toxic waste and chemical toxins in the 1960s and 1970s.

The decision caps a decade long struggle over the 1,200-mile pipeline that would have ferried oil sands crude from Alberta to Steele City, Nebraska. The project had long been battered by the political winds in the U.S., having first been rejected by former President Barack Obama before former President Donald Trump revived it in 2017.

Biden issued an executive order revoking the critical presidential permit for Keystone XL on his first day in office.

The project became a lightning rod for environmentalists because it would provide an outlet for heavy Canadian oil sands crude extracted in Alberta through particularly energy-intensive processes. Activists said the resulting crude has a higher carbon footprint and burning it would exacerbate climate change.

They mounted a decade-long campaign against the project, with battles fought in statehouses and federal courtrooms — and celebrity-attended protests from the Midwest to the White House.

“When this fight began, people thought Big Oil couldn’t be beat,” said Bill McKibben, the founder of 350.org, who led the first sit-ins against Keystone XL at the White House in 2011. “But when enough people rise up, we’re stronger even than the richest fossil fuel companies.”

Whole segments of the line, including one that crosses to U.S.-Canadian border, have already been built.

Republicans immediately pounced on the move, blaming Biden for the cancellation and contrasting the president’s opposition to Keystone XL with his administration’s approach to Nord Stream 2, a pipeline to transport natural gas from Russia to Germany. The Biden administration waived sanctions on the company building Nord Stream 2 last month.

Sen. Steve Daines, a Montana Republican, called it “devastating news for our economy, jobs, environment and national security — and it’s entirely President Biden’s fault.”

Sen. John Barrasso, a Republican from Wyoming, said Biden’s opposition to Keystone XL “ended pipeline construction and handed one thousand workers pink slips.”