The B.C. Liberals have retained their hold on power — but the final result could change in the weeks to come.

As of midnight PT Tuesday, Christy Clark and her Liberals had been declared elected in 43 of B.C.'s 87 ridings, compared to 41 for the NDP and three for the Green Party. It takes 44 seats to form a majority in B.C.

It is B.C.'s first minority government result since 1952.

But several ridings will have recounts — including Courtenay-Comox, where the NDP lead by just nine votes — and absentee ballots have not been counted.

It means that everyone's focus will go to the final count by Elections BC, which will happen between May 22 and 24.

And it means the leaders of all three parties gave optimistic speeches, unsure of what their fates will ultimately be.

"We have won the popular vote, and we have won the most seats, and with absentee ballots still to come, I am confident they will strengthen our margin of victory," said Clark, who will remain premier and who could still lead a majority government.

Christy Clark: "I will work with the other parties to do what needs to be done." <a href="https://twitter.com/hashtag/bcvotes2017?src=hash">#bcvotes2017</a> <a href="https://twitter.com/hashtag/bcvotes?src=hash">#bcvotes</a> <a href="https://twitter.com/hashtag/bcelxn17?src=hash">#bcelxn17</a> <a href="https://t.co/ENPkzIscsw">pic.twitter.com/ENPkzIscsw</a> —@cbcnewsbc

"British Columbians have waited 16 years for a government that works for them, and we're going to have you to wait a while longer, until all the votes are counted," said NDP Leader John Horgan, whose party aligns closely with the Green Party on a number of key issues.

Green's <a href="https://twitter.com/AJWVictoriaBC">@AJWVictoriaBC</a> says they will be tabling legislation banning "big money in politics," but "we will work with anyone." <a href="https://t.co/sD6f4EgL5B">pic.twitter.com/sD6f4EgL5B</a> —@cbcnewsbc

"What a historic day for British Columbia," said Green Party Leader Andrew Weaver as he began his speech — though he gave no hint as to what would happen in the days ahead.

"I'm not answering questions like that. We're starting negotiations tomorrow," said Weaver to reporters at approximately 12:30 a.m. PT.

"I'm going home."

The leaders of all three parties gave optimistic speeches, unsure of what their fates will ultimately be. (From left to right: NDP Leader John Horgan, Green Party Leader Andrew Weaver and Liberal Leader Christy Clark.) (Darryl Dyck/Canadian Press, Chad Hipolito/Canadian Press, Jonathan Hayward/Canadian Press)

What happens in a minority?

There are two standard governing arrangements when no party can command a majority in the legislature.

The first, which Canadians saw with the federal government from 2004 to 2011, involves one party fully in control of cabinet and the executive branch of government, but regularly negotiating with other parties in order to get enough votes to pass legislation.

The second approach is a coalition government where a formal agreement is made between multiple parties, usually involving the sharing of cabinet posts, along with guarantees on certain pieces of legislation and how decisions will be made.

Much would depend on who the Green Party would pledge to support and under what conditions it would be offered. But the party is being cagey as to how it would proceed in such a scenario.

"We're open to everything," said Andrew Weaver in a Facebook Live interview with CBC a week before the election.

"We're open to coalitions. We're open to minorities. We're ready to work with anyone and everyone."

Weaver said there was one specific thing any party looking for the Greens' support would have to agree to: the abolition of corporate and union donations.

"Without any question, that's a deal-breaker. We've got to get the money out of politics."

Regional realignment

The vote seems to be indicating a further realignment of British Columbia's electoral map.

The NDP focused much of its campaign on suburban ridings in Metro Vancouver — and its strategy seems to have worked.

The NDP won In Burnaby North, Vancouver-Fraserview, Surrey-Fleetwood, Maple Ridge-Pitt Meadows and North Vancouver-Lonsdale — all seats it lost last time.

But the Liberals took two longtime NDP seats in the Interior, in Skeena and Columbia River-Revelstoke, while holding all of their current seats.

And the Green Party's position as the second main party on Vancouver Island has become more entrenched, with the party winning in Cowichan Valley, Saanich North and the Islands, and Weaver's seat of Oak Bay-Gordon Head — giving it one more seat than the Liberals in the region.