Green Party candidate Paul Manly has won the federal byelection in the B.C. riding of Nanaimo-Ladysmith.

Manly is the second Green candidate elected to a federal seat after the party's leader, Elizabeth May, the sole elected Green MP in the House of Commons since 2011.

With almost 99 per cent of polls reporting, Manly had 37.3 per cent of the vote. Conservatives captured 24.8 per cent, and the NDP 23.1 per cent. The Liberals lagged behind with 11 per cent.

Manly's victory in the Vancouver Island riding comes with less than six months remaining before October's general election.

In a written statement released shortly after results were announced, the Green Party of Canada said the win "hailed the dawn of a new era in federal politics," and noted the riding had traditionally been an NDP stronghold.

May thanked voters, writing "it is brave to vote for real change."

'Political courage'

Manly, who previously captured 20 per cent of the vote in the same riding in 2015, said his win four years later suggests Canadians are ready for a "different kind of politics," and are focused on working across party lines.

He said he believes affordable housing, homeless camps — and most importantly climate change — are the issues that led the party to victory.

"There's so much technology available to us, there's so much we could be doing, it's just a matter of [having] the political courage to do that, and I think people saw that in me," he said.

"Whether it's people dealing with floods in the east or forest fires in the west, people are seeing the threat now. Our forests are dying around us and it's time to take bold action."

Ran over to Green Party headquarters. Jubilant atmosphere here a huge contrast to dejected mood at NDP headquarters. Winning candidate Paul Manly grinning ear to ear. <a href="https://twitter.com/cbcnewsbc?ref_src=twsrc%5Etfw">@cbcnewsbc</a> <a href="https://twitter.com/hashtag/cbc?src=hash&ref_src=twsrc%5Etfw">#cbc</a> <a href="https://twitter.com/hashtag/bcpoli?src=hash&ref_src=twsrc%5Etfw">#bcpoli</a> <a href="https://twitter.com/hashtag/cdnpoli?src=hash&ref_src=twsrc%5Etfw">#cdnpoli</a> <a href="https://twitter.com/hashtag/NanaimoLadysmith?src=hash&ref_src=twsrc%5Etfw">#NanaimoLadysmith</a> <a href="https://twitter.com/hashtag/byelections2019?src=hash&ref_src=twsrc%5Etfw">#byelections2019</a> <a href="https://t.co/ozYq5V45zM">pic.twitter.com/ozYq5V45zM</a> —@CBCtanya

B.C. Green Party leader Andrew Weaver also issued a statement, calling Manly an "extraordinary colleague" for May in Ottawa.

The last of four byelections held in 2019, the Nanaimo-Ladysmith race was seen by many as a litmus test for the federal election in October.

The contested seat has been vacant since early January, when the NDP's Sheila Malcolmson stepped down for a successful run at provincial politics.

Monday's vote is the latest in a string of elections in the Vancouver Island community. There was a municipal vote in October, after which Leonard Krog, the five-term NDP member of the B.C. legislature, resigned to serve as mayor of Nanaimo.

Krog's municipal victory triggered a provincial byelection which was won by Malcolmson, leaving her federal seat open.

That means that by the federal election next fall, voters in the riding will be facing their fourth election in 12 months.

'There's still NDP in this town'

At a viewing party, NDP candidate Bob Chamberlin told a thinning crowd "there's still the NDP in this town."

"This turnout isn't the outcome we were hoping for ... but we have a lot to be proud of as NDP tonight," he said.

People leave a polling station before the Nanaimo-Ladysmith byelection on Vancouver Island. (Chad Hipolito/The Canadian Press)

Nanaimo–Ladysmith was created in 2012 when the boundaries of two ridings — one encompassing the community of Alberni and the other Cowichan — were redrawn.

The two ridings were solidly Conservative and NDP, respectively, meaning the new riding had strong bases for two parties on opposing ends of the political spectrum.

Macolmson took the riding by 10 points in the 2015 election, but the Liberals and Conservatives also put up strong and nearly identical showings at around 23 per cent of the vote.