WASHINGTON -- The seven-year saga of the Keystone XL pipeline culminated Friday in U.S. President Barack Obama rejecting a project that had become the biggest irritant in Canada-U.S. relations, amid its improbable escalation from an isolated land dispute into a major cross-border environmental struggle.

The pipeline became the fault line in the American battle over climate change as the green movement pressed the president to turn down a permit that would have allowed Calgary-based TransCanada Corp. to ship bitumen from Alberta's oilsands to U.S. Gulf Coast refineries.

After years of suspense and a change in government in Canada, Obama called the new prime minister to break the news Friday: the project is being rejected because it's not in the U.S. national interest.

Obama's stated rationale wasn't that Keystone mattered much. In fact he argued that it mattered very little, to the U.S. economy and to global greenhouse-gas emissions. But he said it had become an important symbol -- and rejecting it proved the U.S. intends to get serious at the upcoming climate summit in Paris.

According to public statements from both leaders, Prime Minister Justin Trudeau expressed disappointment but vowed not to let the development poison relations between the countries.

Trudeau has promised a more constructive tone on climate change and on the broader relationship than his predecessor Stephen Harper, who cancelled the last North American leaders' summit in frustration over the pipeline issue.

"We are disappointed by the decision but respect the right of the United States to make the decision," Trudeau said in a statement.

"The Canada-U.S. relationship is much bigger than any one project and I look forward to a fresh start with President Obama to strengthen our remarkable ties in a spirit of friendship and co-operation."

The death of the project has an array of consequences on people living near the route, on businesses linked to the oil industry, and on a now-jubilant climate-change movement.

But critics argue that Obama's logic is built on sand.

His own State Department has repeatedly concluded that this project would be better for the environment than high-emitting trains. That dirtier rail transport is skyrocketing. And Canadian oil exports have continued to rise, even as oilsands opponents worked to block pipelines -- first Keystone, and now others within Canada.

Keystone would have handled nearly one-quarter of all the Canadian oil exports to the United States, which would have created thousands of temporary jobs and longer-term resource revenues for American counties along the route.

Sources recently indicated that TransCanada Corp. was weighing a possible NAFTA lawsuit as it braced for a rejection, its storage yards stacked with mounds of unused pipe in a project that has cost the Calgary company billions. Its share price had plummeted 40 per cent since last year with falling oil prices, and dropped another five per cent Friday.

The company said Friday that it was reviewing its options, including filing a new permit. The project will likely become a 2016 U.S. presidential election issue, with Republicans all aligned in favour of it.

"Today, misplaced symbolism was chosen over merit and science -- rhetoric won out over reason," TransCanada president Russ Girling said in a statement.

"We believe KXL is in the best interest of the United States and Canada."

Unfortunately for them, the man in the Oval Office disagreed.

Obama began his remarks in the White House by dismissing the rhetoric of both sides in the debate -- he said the project would neither have been a huge economic boost, nor a climate disaster.

But the Obama administration was tasked with determining whether the project satisfied the national interest. It concluded the effect on job-creation; oil prices; U.S. energy supplies; and perhaps even greenhouse-gas emissions were virtually nil.

But Obama said it mattered -- as a signal entering this month's big climate summit.

"America is now a global leader when it comes to taking serious action to fight climate change," Obama said. "And frankly, approving this project would have undercut that global leadership. And that's the biggest risk we face -- not acting."

He continued: "Today, we're continuing to lead by example. Because ultimately, if we're going to prevent large parts of this Earth from becoming not only inhospitable but uninhabitable in our lifetimes, we're going to have to keep some fossil fuels in the ground."

Obama certainly didn't sound like a pipeline opponent a few years ago.

He'd even appeared at a TransCanada pipe yard for an election-year speech in 2012 where he promised to get the southern leg of Keystone XL opened as quickly as possible. Oil began flowing two years in that southern portion, between the U.S. midwest and Gulf Coast refineries.

But Obama's tone hardened. He even vetoed a bill passed by Congress this year that would have forced him to approve the northern leg.

His change in approach delighted Bill McKibben, an activist who helped organize the first Washington protest against Keystone XL four years ago.

"President Obama is the first world leader to reject a project because of its effect on the climate. That gives him new stature as an environmental leader," said McKibben, head of the group 350.org.

Alberta's new NDP premier expressed disappointment in how the president characterized her province's oil. She said she'd spoken with Trudeau about the importance of securing new export routes, which face opposition.

She also said the rejection proves the need for action on climate change in Paris, to help rehabilitate Alberta oil's reputation.

"The decision ... underlines the need to improve our environmental record and hence our reputation so that we can achieve our goal of building Canada's energy infrastructure -- including pipelines -- to new markets," she said.