The BC NDP and Greens have formed an agreement to topple Premier Christy Clark's fragile minority government at the earliest opportunity after sealing a pact over the parties' shared opposition to resource projects such as the Kinder Morgan pipeline and Site C hydroelectric dam.

NDP Leader John Horgan and Green Party Leader Andrew Weaver announced they have negotiated a deal that would allow an NDP minority government to survive a four-year term. The combined alliance would lead to a governing arrangement with a margin of only a single seat over the Liberals. The balance of power is that much more precarious considering that any new government must appoint a Speaker of the House.

Combined, the NDP's 41 seats and the Greens' three seats outnumber the Liberals' 43 seats. An NDP government formed with the support of the Greens – the Greens have explicitly rejected a coalition government – would give the parties a single-seat majority.

Story continues below advertisement

Gary Mason: It's not yet a done deal, but expectations are already shifting in B.C. politics

Opinion: B.C.'s political union: Promises, a jilted suitor and four years of drama

The defeat of the Liberals could have major national implications if the two parties work together, as expected, to ensure Kinder Morgan's Trans Mountain project never gets built. Immediately after the announcement Monday, Alberta's deputy premier congratulated all three parties but noted it's up to the federal government to approve pipelines.

Prime Minister Justin Trudeau has given that approval and the BC Liberals declared the project met the provincial government's five conditions for approval.

The details of the agreement between the NDP and the Greens will be released Tuesday after ratification by the NDP caucus, so the plans for how to oppose Kinder Morgan are not yet public.

But Mr. Weaver revealed the issue was key to the Greens' decision to reject the Liberals' overtures.

"This issue of Kinder Morgan is one that was critical to us," Mr. Weaver told reporters.

Story continues below advertisement

Sources close to the negotiations also indicated the Liberals' commitment to building the $8.8-billion Site C hydroelectric dam was another issue that led the Greens to favour a deal with the NDP.

Norman Spector, a former chief of staff to prime minister Brian Mulroney and deputy minister to B.C. premier Bill Bennett, was hired as a consultant on political strategy for the Greens with the Liberals and the NDP during talks aimed at securing Green support in the wake of the close May 9 election. In the room for the Liberals was Brad Bennett, the former premier's son.

Mr. Spector told CBC in an interview Monday that at one point, Mr. Weaver "basically looked across at Brad Bennett, and said, 'You know Brad, I think maybe it's time for a time-out for the Liberals.'"

In a series of tweets on Monday, Mr. Spector said that during the negotiations it appeared the Greens could have reached a deal with either party.

Ultimately, he wrote, they "recoiled [sometimes physically] at the prospect of supporting a Liberal government."

The Green Party campaigned hard against the Trans Mountain pipeline and Mr. Horgan has said his party would use every tool available to scuttle the project.

Story continues below advertisement

On Monday, Sarah Hoffman, Alberta's deputy Premier, made it clear her provincial government expects the federal Liberals to ensure the project goes ahead.

"As far as we're concerned, the federal government has the authority to approve pipelines," Ms. Hoffman said. "They've made that decision and our pipeline is moving forward. We have intervenor status should we need it. We will continue to stand up for Albertans and making sure we get our pipelines built and access to tidewater. It is not only good for Alberta jobs and the Alberta economy, it is good for Canada's economy and Canadian jobs."

The deal paves the way for Mr. Horgan to become the first New Democrat to hold the keys to the Premier's office since 2001. Mr. Horgan indicated Monday he will be visiting the Lieutenant-Governor to point out the new-found agreement.

"We now have with our 41 members, and the three Green members, the majority of support in the legislature. We'll be making that known to the Lieutenant-Governor in the next number of days," Mr. Horgan told reporters.

But the next move belongs in the hands of Premier Clark and Lieutenant-Governor Judith Guichon.

Ms. Clark she will consult with her caucus before responding on Tuesday. It's not clear when she will call the legislature back.

Story continues below advertisement

In her statement, the Premier suggested British Columbians should be worried about an NDP-led government. "It's vitally important that British Columbians see the specific details of the agreement … which could have far-reaching consequences for our province's future."

Mr. Weaver bristled at her suggestion that the NDP and Greens would kill jobs in British Columbia – a claim she raised throughout the election.

"We are talking about an economic agenda … to ensure we embrace the jobs of the 21st century," he told reporters. "I think under this minority government you will see real, secure, stable job growth."

Faced with the prospect of a defeat in the House, Ms. Clark could resign, or she could ask the Lieutenant-Governor to call another election. Alternatively, she could ask Ms. Guichon to recall the legislature and introduce a Speech from the Throne, which would then allow the Premier to formally test the confidence of the House. The NDP and the Greens could then bring down the government.

If Ms. Clark lost a vote of confidence, the Lieutenant-Governor could choose to call another election, but she would also have the option to ask Mr. Horgan whether he could pass a vote of confidence in the House.

During the four years that Mr. Weaver was the sole Green MLA in the legislature, and throughout the election campaign, the Greens and the NDP traded barbs and displayed at times a strong animosity that might have derailed any deal. Mr. Weaver said the time he spent in face-to-face negotiations with Mr. Horgan helped him overcome his mistrust of the NDP Leader and the pair were spotted on Sunday watching the Canadian women's rugby match against New Zealand near Victoria.

Story continues below advertisement

During the negotiations, Mr. Weaver announced his party had three key demands – the Greens want to be elevated to official party status, they want campaign-finance reform and they want electoral changes brought in before the next election.

On Monday, he would not say whether he has won an agreement to introduce changes to ensure the next election is held under a new voting system of proportional representation. However, he did say: "We are looking to show to British Columbians that minority governments can work … in the best interests of people."