With the election of NDP MLA Leonard Krog as the next mayor of Nanaimo, British Columbia's political parties are getting ready to battle it out for his empty seat in the Legislature once he takes up his new job at city hall.

Krog's victory has set the stage for a high-stakes byelection that threatens already precarious balance of power in Victoria.

There are currently 42 Liberals, 41 New Democrats, three Greens and one independent in the Legislature.

A Liberal victory wouldn't be enough to tip the balance of power in the party's favour, but could lead to a tie between it and the NDP-Green alliance.

Krog, however, said he's confident the NDP can hold onto the seat.

"We have a very popular premier, I would argue a very popular government and the economy is going along nicely," the mayor-elect told CTV News.

Nanaimo is considered a safe NDP riding, but governments often struggle in byelections, leaving the opposition Liberals optimistic about their chances.

"In Nanaimo, people are starting to feel that maybe their incomes aren't matching their expenses and that's something the government needs to be accountable for," said BC Liberal Leader Andrew Wilkinson, adding that his party has "a very good chance."

But political science professor Hamish Telford said voters are likely to play it safe knowing the government is at stake.

"In other byelections, people can feel free to vote any way they want—perhaps send the government a warning message without changing the overall legislative results. They can vote with a kind of freedom that they don't have in this case," said Telford, who teaches at the University of the Fraser Valley.

The Greens have also said they would run a candidate, which poses a risk of splitting up votes that might otherwise have gone to the NDP.

Krog said his last day in provincial politics will be in late November or early December.

"There's been a request I stay on, certainly in terms of voting for the session," he said.

Premier John Horgan said he plans to have a new MLA in place by February.

With files from CTV Vancouver's Bhinder Sajan