OTTAWA (Reuters) - The Canadian government on Friday reached a deal with eight of the 10 provinces to introduce a landmark national carbon price, which Prime Minister Justin Trudeau says will help Canada meet its international climate change obligations.

Slideshow ( 9 images )

The agreement was only struck after hours of heated talks and energy-producing Saskatchewan did not sign up, saying the measure would make firms uncompetitive at a time when incoming U.S. President Donald Trump looks set to adopt policies cutting energy costs.

In a sign of the tension that remained after the negotiations, Trudeau and Saskatchewan Premier Brad Wall exchanged barbed comments at the closing news conference.

The carbon price is part of a framework that aims to help Canada attain its Paris goal of reducing emissions by 30 percent from 2005 levels by 2030. The measures include boosting the use of renewable energy and investing in clean technologies.

“(This) will both protect our economy and protect the environment at the same time,” Trudeau told reporters.

Under his plan, carbon pollution would cost C$10 ($7.60) a tonne in 2018, rising by C$10 a year until it reaches C$50 in 2022. The provinces can either implement a carbon tax or a cap-and-trade market.

Trudeau is broadly aligned politically with President Barack Obama, who has pushed hard to cut emissions of greenhouse gases.

U.S. Vice President Joe Biden told the meeting he doubted Trump could undo much of the administration’s policies since many of them had taken firm hold.

Wall, though, noted Trump’s decision to put a climate skeptic in charge of the U.S. Environmental Protection Agency, which Obama used to push through many green measures.

“Let’s not be naive as Canadians. This is our No.1, not just trading partner, but competitor ... we need to be competitive with them,” he said.

“Canadian climate policy will be set by Canadians, not by whoever happens to be president of the United States,” Trudeau immediately replied.

Environmental groups largely welcomed the announcement, but some said Trudeau’s recent approval of two crude oil pipelines would make it harder for Canada to meet its Paris targets.

Trudeau, who vows to impose a carbon price on any province that refuses to sign the deal, did not answer directly when asked when he would move against Saskatchewan.

Manitoba also declined to sign, saying it wanted Ottawa to hand over more money for health care first, but officials said it might join later.

($1=$1.32 Canadian)