New Democratic Party Leader Dominic Cardy says his byelection defeat in Rothesay on Monday shows his party needs to continue modernizing.

Cardy dramatically increased the NDP’s share of the vote in Rothesay but he still finished third behind the Progressive Conservatives and Liberals.

Cardy was hoping to become the first New Democrat to sit in the legislature in seven years.

The NDP leader earned about 28 per cent of the vote, which he said was a huge improvement over the eight per cent the party won in the southern New Brunswick riding in the 2010 election.

"My goal as NDP leader is to make sure our party can take government. And this was a first shot for us to try out our new campaign techniques,” he said.

“We managed to knock on every door in Rothesay and massively increase our vote over previous results, and clearly re-establish ourselves as a contender for power in the province. But we didn't get there yet. So my party has to continue to change, to modernize, to move forward."

Tory candidate Hugh John (Ted) Flemming III won the byelection with about 38 per cent of the vote.

While Flemming held onto the riding for the Tories, he saw his party's share of the vote drop from the 56 per cent it earned in 2010.

The seat was vacated when former energy minister Margaret-Ann Blaney left politics to become the president of Efficiency New Brunswick.

The NDP had brought in high-profile national politicians, such as federal leader Tom Mulcair and Toronto MP Olivia Chow, to give a boost to Cardy's campaign.

Cardy attempted to put a brave face on the third place finish on Monday night.

"In just three and a half weeks, we managed to put together a team that pulled nearly thirty per cent of the vote. Just see what we can do in two years,” he said.

This may be the final attempt the NDP leader has to get a seat in the legislature before the next general election in 2014.

NDP split vote, Liberal says

Liberal John Wilcox held onto the party’s traditional base of support and was able to finish in second place.

Wilcox said, unlike in the last election, more than half the voters cast ballots against the PCs.

"It's a shame the vote is split, but you know what? A message was sent to the Conservative party,” he said.

Flemming acknowledged on Monday voters were upset about patronage appointments and other issues.

"I campaigned hard door to door. I know there's issues. I know that in a byelection, halfway through a term, people have a tendency to want to let off a little steam,” Flemming said.

“So they did. But at the end of the day, I think our hard work prevailed and the record of the Alward government prevailed."

Flemming is the grandson of Hugh John Flemming, who was premier of New Brunswick in the 1950s.

He may be in line for a cabinet job. Premier David Alward had held off naming a new permanent energy minister pending the byelection results.