Early this year, Christy Clark's Liberal government announced a deal with Kinder Morgan Inc. that outlined cash payments over two decades in exchange for a clear "yes" on the Trans Mountain pipeline expansion project.

That contract would see the company give British Columbia annual amounts for 20 years to fund environmental projects in exchange for provincial approval of the pipeline. The Premier's critics called it a shakedown, saying it was unprecedented for a company to pay a provincial government for crossing its territory to deliver goods to market.

However cynical it appeared, the deal between Kinder Morgan and the B.C. government was also seen as a pragmatic political solution. It gave Ms. Clark the ability to say that the controversial pipeline expansion to transport Alberta heavy crude to global markets, adding more oil tanker traffic in coastal waters, would also be in her province's interest.

Story continues below advertisement

The federal government had already approved the pipeline. B.C.'s agreement gave Ottawa a reprieve from the dangerous political territory of being forced to assert its authority over such projects.

B.C. Premier Christy Clark listens to a question during a news conference in Vancouver, B.C., on Tuesday May 30, 2017. Darryl Dyck/The Canadian Press

But the contract now faces an unravelling – and along with it, the fine political balance that was in place to get the pipeline expansion built across provincial lines.

The BC Liberals lost their majority in the May 9 provincial vote after 16 years of government. And, although NDP Leader John Horgan said little about his party's opposition to the pipeline project during the campaign, it became clear the New Democrats would need a partner to win control of the legislature.

Enter the three newly elected Green MLAs.

With clout that now exceeds the size of his small caucus, BC Green Leader Andrew Weaver entered into a partnership with the NDP this week around opposition to the pipeline. Mr. Weaver now says one of the first orders of business will be to seek legal counsel from the Attorney General about walking away from the 20-year deal brokered by Ms. Clark.

The changes Mr. Weaver's Greens and the NDP could enact go far beyond the elimination of one profit-sharing contract, or even the protection of British Columbia's coastal waters from increased tanker traffic, or the interests of Alberta's oil-fuelled economy.

B.C. Green party leader Andrew Weaver speaks to media in the rose garden on the Legislature grounds in Victoria, B.C., on May 10, 2017. Chad Hipolito/The Canadian Press

The fate of the $7.4-billion project has become a defining moment in the national debate over natural-resources development and environmental protection; over what role other levels of government have in approving interprovincial projects; and the degree of consultation and consent that is required from Indigenous Canadians.

Story continues below advertisement

It may take rulings from the Supreme Court and fractious political battles on a national scale to fully answer those questions.

Hanging in the balance is the relationship between provinces, the protection of coastlines, the country's resource economy and Canada's climate-change strategy knitted together by the Liberal government of Prime Minister Justin Trudeau.

"This isn't just about Trans Mountain. This is not just about B.C. It's not just about one region of the country," said Martha Hall Findlay, president and chief executive of the Canada West Foundation, who believes it's essential to stick with regulatory and cabinet decisions to approve the pipeline project. "This is about the whole country."

If the Trans Mountain deal is derailed, Mr. Trudeau's climate plan will be seriously undermined as conservative politicians and industry skeptics ratchet up their attack on the Alberta carbon-pricing plan, which is a cornerstone of the federal effort.

Prime Minister Justin Trudeau, left, and Alberta Premier Rachel Notley chat prior to a roundtable meeting with oil and gas producers in Calgary, Alberta, on Thursday, Feb. 4, 2016. Larry MacDougal/The Canadian Press

Mr. Weaver berated Alberta Premier Rachel Notley this week for being stuck in 20th-century devotion to fossil fuels. Yet, she faces election in two years and significant challenges from conservative parties who want to scrap her province's carbon tax. A pipeline victory, while not securing her re-election, would certainly help.

The battle in B.C. will reverberate in Quebec, where TransCanada Corp. faces provincial scrutiny over its proposed $15.7-billion Energy East pipeline, currently under review by the National Energy Board as well as Quebec's regulatory body. The company says it will co-operate with the provincial regulator but insists it is Ottawa that has the final say.

Story continues below advertisement

If an incoming NDP government can block the Trans Mountain expansion in British Columbia, critics in Quebec will be emboldened to demand their provincial government take similar action in the event Ottawa approves Energy East.

If a spat between two Western provinces would be a political headache for Mr. Trudeau's Liberals, a battle between Alberta and Quebec over the fate of crude-oil exports could precipitate a full-blown national-unity crisis.

For his part, Mr. Weaver is showing no sign he's interested in diplomatic entreaties; nor that he's scared of a showdown with Ottawa. The climate scientist is unmoved by the argument that killing the pipeline project will hurt Ottawa's ability to move forward with the national framework on climate action. "The horse-trading that went into that is frankly shocking," Mr. Weaver said of Mr. Trudeau's countrywide deal.

In an interview, he added that the Prime Minister was wrong to sign the Paris accord on climate action, and then approve the Trans Mountain pipeline expansion to win support for his policy moves in Alberta.

"Mr. Trudeau was a hypocrite to stand up and sign Paris and then sign these pipeline deals."

The Trans Mountain expansion would see the pipeline twinned to increase the system's capacity to 890,000 barrels a day from the current 300,000. But, even before Mr. Weaver was set to become a political kingmaker, there were serious hurdles to the project, which already faced 19 court challenges launched by First Nations, environmental groups and the cities of Vancouver and Burnaby.

Kinder Morgan Trans Mountain Expansion Project’s Westeridge loading dock, at bottom with green tanks, is seen in Burnaby, B.C., on Friday, Nov. 25, 2016. JONATHAN HAYWARD/THE CANADIAN PRESS

The increase in oil-tanker traffic and the risk of bitumen spills into the Pacific remains the biggest bone of contention. Right now, a total of about 250 commercial vessels, of all types, traverse the ocean waters each month. The pipeline expansion would increase the number of oil tankers travelling from the Westridge Marine Terminal each month to 34, from the current five.

Activists have predicted that Burnaby, B.C., could see months of protest similar to those against the Dakota Access Pipeline near the Standing Rock Indian Reservation in the U.S. Midwest.

And opposition to the Trans Mountain expansion isn't limited to the coast.

Near Merritt in B.C.'s Central Interior, Chief Lee Spahan of the Coldwater Indian Band has said his community is concerned about the impact of the expanded pipeline on the aquifer the band relies on for drinking water and irrigation. "A spill would be catastrophic," he said.

But for those who want the Edmonton-to-Burnaby pipeline expansion to go ahead, Trans Mountain is a key to having unfettered access to global markets. Indeed, Ms. Notley argues that the Trans Mountain expansion goes to the very heart of Confederation: A land-locked province must be able to move its commodities through neighbouring jurisdictions.

"At the end of the day, we are at a turning point," Ms. Notley said in an interview this week with The Globe and Mail's Gary Mason.

By giving local concerns "veto power over overall national benefits – then that's where we take the wrong path in relation to a 21st-century economy," she said.

Her province's carbon tax is under siege from the right-of-centre Wildrose and Progressive Conservative parties. Facing an election in 2019, Ms. Notley has been eager to demonstrate to voters that her government's action on climate change would facilitate access to new markets on behalf of the province's beleaguered oil industry and tens of thousands of unemployed energy workers.

Alberta Premier Rachel Notley speaks in Edmonton, Alta. on Monday May 30, 2016. JASON FRANSON/The Canadian Press

Last fall, Ms. Notley told reporters her support for the federal carbon pricing initiative that eventually reaches $50 per tonne – a critical part of the Liberal government's pan-Canadian climate strategy – would be revisited if the Trans Mountain expansion isn't built. This week, her office said she remains committed to Alberta's own Climate Leadership Plan, which includes another increase to carbon taxes and a cap on emissions from the oil sands, and Ottawa's plan.

Even if it's unclear what steps the Alberta Premier could take if the pipeline is not built, the NDP-Green alliance next door has made her more combative in recent days. She told a radio show that Canada "can't be a country that says one of its two functional coastlines is only going to do what the people who live right beside it want to do."

Nothing stops the province from shipping oil by rail, she also told The Globe.

From an economic point of view, many in the resource-focused province are concerned that the constant delays and regulatory costs will kill the expansion project.

They fear a lack of new pipeline capacity will leave Canada shut out of competitive international markets for oil in the decades to come. The United States, a consumer of and competitor to Canadian oil, is moving quickly to ship oil internationally – it exported a record 1.3 million barrels of crude a day onto the world market late last month.

And more pressure for the Canadian industry could come further down the road: As renewable energy technology becomes economic and efficient beyond any predictions made just a few years ago, and growth in the global demand for oil slows, Canada needs to capture market share while the worldwide appetite for oil still exists.

More immediately, the industry argues it doesn't make good business sense to be beholden to the United States for virtually all – 99 per cent – of its export market.

"Not all pipelines are created equal," said Michael Tran, a commodity strategist for RBC Dominion Securities.

"Pipelines facing the Pacific are by far the most important given the growth potential on the other end," said Mr. Tran, who works in New York but who grew up in Kitimat, B.C. "It's imperative that Canada obtains access to the Asian market. Emerging Asia, countries like China and India, are really, by far, the biggest oil-demand drivers on a global basis."

A pipeline is pictured at the Kinder Morgan Trans Mountain expansion project in Burnaby, B.C. JONATHAN HAYWARD/The Canadian Press

There is also speculation in Calgary's downtown office towers about whether environmental opposition to major infrastructure projects allows anything, including natural gas projects, to be built in a timely manner.

Dan Allan, president of the Canadian Society for Unconventional Resources – an industry group – says stricter environmental rules and political uncertainty means some foreign investors are rethinking investments in Canadian energy projects.

"Money has started to move elsewhere," he said. "Our assessment is our activity levels are going to drop off. And the wealth creation that was fuelling Canada is going to start to dissipate."

There are other complications, as well. Former Alberta cabinet minister Ted Morton, now a fellow at the University of Calgary's School of Public Policy, said if a new B.C. government is successful in blocking the project, Kinder Morgan may have an avenue to successfully sue the province for billions of dollars under the North American free-trade agreement investor-state section.

For its part, Kinder Morgan has shown no sign it's wavering from its plan to have shovels in the ground in September. On Friday, the company's Canadian president said he's open to talking to the provincial NDP and Green parties, but emphasized the project has already been federally approved and has the support of the Prime Minister.

"We'll continue to listen," Ian Anderson said. "But I don't have any concessions planned for any further discussion at this point."

Even so, uncertainty about the project weighed on the stock-market debut of the company's Canadian unit. Shares of Kinder Morgan Canada Ltd. tumbled on their first day of trading on the Toronto Stock Exchange this week, after the company raised $1.75-billion in an initial public offering. Investors were spooked by a prospectus that listed public blockades, legal challenges, the risk of not obtaining land rights and the failure to resolve aboriginal-rights issues as possible reasons why the pipeline may not be built

Replacement pipe is stored near crude oil storage tanks at Kinder Morgan’s Trans Mountain Pipeline terminal in Kamloops, B.C. Chris Helgren/REUTERS

The attempt to unwind the 20-year deal between British Columbia and Kinder Morgan could be the first test as the NDP-Green partnership works to oppose the pipeline's construction. According to recent court rulings, provinces can review interprovincial pipeline projects and can add conditions "provided they do not render the project impossible," said Erik Richer La Flèche, partner at Stikeman Elliott LP in Montreal

Eugene Kung, who has been working on the Kinder Morgan file for West Coast Environmental Law, believes a New Democrat-led government in B.C. will have to take its contract with Kinder Morgan seriously. But he noted there is nothing in the deal that can hinder the B.C. legislature's ability to pass laws.

However, Mr. Kung believes the strongest avenue to fight the pipeline will be found in Indigenous rights. Because there are few treaties settled in British Columbia, Indigenous rights are a large part of the 19 court challenges the project faces in federal and provincial courts.

Mr. Kung added that Alberta's Premier is only partly correct when she said the B.C. government must allow her province access to the coast because it cannot can lay solitary claim to western tidewaters.

"It's true B.C. doesn't own the coast – it's the Indigenous people who never ceded that land who own the coast," Mr. Kung said. "That is part of the toolbox that this new B.C. government has."

Opponents also question the need for a pipeline project that would entail heightened risks to coastal waters – particularly if Enbridge Inc. proceeds with the expansion of its main Line 3 export pipeline to the U.S. and TransCanada gets the green light to build the Keystone XL line to the Gulf Coast refining hub.

"There are more pipelines proposed than are required to meet the needs of the Canadian oil sector," said Tom Gunton, a former B.C. deputy minister and professor at Simon Fraser University's School of Resource and Environmental Management.

A protester dances with a sign during a march against the proposed expansion of Kinder Morgan’s Trans Mountain Pipeline, on the Cambie Street bridge in Vancouver, B.C., on November 19, 2016. CHRIS HELGREN/REUTERS

Prof. Gunton also challenges Ms. Notley's position that access to Pacific markets would fetch higher prices for Alberta's crude. In a global marketplace, prices in different regions tend to converge, adjust for crude quality and the cost of transportation, he said.

The eventual resolution of the Trans Mountain issue will also serve as a precedent for another controversial pipeline project: TransCanada's proposed Energy East line. It will travel from Alberta through Ontario and Quebec to a refinery and export terminal in Saint John, N.B. It has stirred a hornet's nest of opposition in Quebec from municipal politicians, the Parti Québécois and First Nations.

In Montreal, Mr. La Flèche expects the jurisdictional tussle in B.C. to end up in the federal courts.

"That has a huge impact for Quebec because politically if [a] pipeline can't go through B.C., there is no way it's going to go through Quebec. If it can't go through the immediate neighbour, why should it go through one so many kilometres away?"

What is clear is this has created a much greater political headache for the Trudeau government. The federal Conservatives want to make sure the Prime Minister cannot simply repeat time-worn lines of support for the project, and avoid the political fray.

This week, the party introduced a House of Commons motion in favour of the project. Conservative MP Mark Strahl, who represents the B.C. riding of Chilliwack Hope, urged Mr. Trudeau to work harder to sell the benefits of the pipeline to British Columbians.

Federal Natural Resources Minister Jim Carr insisted the government's support for the project has not been affected by the political upheaval.

"While the government in B.C. may change, the facts, the science, the evidence, the environmental considerations; the economic benefits, the jobs – all of these remain unchanged. This project was and this project is in the best interest of Canadians."