FREDERICTON -- David Alward walked away from the leadership of New Brunswick's Progressive Conservatives on Tuesday, about 12 hours after his party was defeated by the Liberals in an election marred by problems counting the votes.

Alward said while he was disappointed with the results of the election, he also would like to see a review of the problems Elections New Brunswick had counting the ballots on Monday night.

"I believe Elections New Brunswick has an obligation to New Brunswickers to ensure that every ballot is counted properly and that there is a thorough review," Alward told a news conference in Fredericton, adding he will continue to represent the riding of Carleton in the legislature.

With a number of close races across the province, Alward said it was important to get the vote count right because the election was decided by about 420 voters in six ridings.

"At the very least there certainly should be a review to determine what happened."

In the middle of the confusion surrounding the results the night before, the president of the Tory party said a recount needed to be done by hand.

However on Tuesday, Alward tempered the party's response, saying Elections New Brunswick is going through its regular post-election review of all the results. That review to look for any irregularities takes four days before producing the official results.

"Before we take any further direction, that's the process that we need to follow," Alward said.

Alward, 54, becomes only the second premier to fail in his bid for a second term in the province's history. He won a majority government in September 2010, unseating the one-term administration of Liberal Shawn Graham.

In this election, Liberal Leader Brian Gallant's party won 27 seats, the Tories were left with 21 and the Greens took one riding.

At 32, Gallant will become the country's youngest premier.

He declined interview requests Tuesday but in a statement said he will meet with Alward on Wednesday to discuss the transition process.

"We haven't always agreed on the proper path forward, but never have I doubted his deep commitment to our collective well-being," Gallant said.

"We are at a critical juncture in our collective future. Some difficult decisions lie ahead. But I promise all New Brunswickers that I will work incredibly hard to ensure our province moves in the right direction."

Chief electoral officer Michael Quinn said Tuesday there was a discrepancy found between election results that were manually entered and those from the tabulation machines on Monday at about 10:15 p.m., so they stopped posting the results to their website.

About 30 minutes later, Elections New Brunswick suspended vote counting for almost two hours.

Quinn said the problem was traced to a program provided to Elections New Brunswick by Dominion Voting.

"The problem is not with the tabulation machines. They know how to count, they do a good job," he told a news conference.

"The problem was in one particular program or process ... which didn't, for some reason, work properly. We identified it. We found out how to correct it, so the results on the web are correct."

A spokesman for Dominion Voting said it remained unclear what caused the problem.

"We haven't looked into our processes to determine why it didn't show up in any of the early testing," James Hoover said at the same news conference. "Our focus is just to get the results done now. That's a topic of discussion later."

Green Leader David Coon, who won the riding of Fredericton South, said he hasn't seen all the details of what happened but public confidence needs to be maintained in the election machinery.

Coon said a review is needed to make recommendations on how to avoid problems in the future after what he called an "unprecedented" series of problems for a Canadian election.

"The bottom line is that New Brunswickers have to feel confident in the election results," he said before Quinn's news conference.

"Obviously there is going to have to be a review of this whole thing to take a look at what happened and why. ... Elections New Brunswick is not looking very good this morning in most people's eyes as a result of this, despite their best efforts, and they did seem to pull it out at the end very late there and get the final results in."

When asked if a review is needed, Quinn replied: "No, we know exactly what happened."

Kris Austin, leader of the People's Alliance of New Brunswick, questioned the results in his riding, saying the numbers his party got from scrutineers at the returning office don't match the numbers they received later on.

"There's just a lot of questions," said Austin, who lost in Fredericton-Grand Lake by 26 votes. "It's not adding up."

Austin said he will ask for a recount in his riding and he supports a recount of all the ballots across the province.

"If nothing else, the people of New Brunswick need a sense of confidence and closure in the election results. And I think the only way that can be achieved is to have a manual recount."

Austin said the legitimacy of the legislature is at stake.

"Obviously the electronic process failed us and to have a government or elected MLAs in power based on a failed process just puts the whole system of democracy in jeopardy," he said.