New Brunswick Liberal Leader Brian Gallant has won a tight provincial election that was thrown into turmoil Monday evening  by a vote-counting glitch.

Brian Gallant/Facebook

The unofficial results have Gallant’s Liberals holding 27 seats in the Legislature compared to 21 ridings for David Alward’s Progressive Conservatives. Five races were decided by fewer than 100 votes, according to CBC News.

The final results were in question for nearly two hours after Elections New Brunswick staff halted results coming from the vote tabulators, due to problems with how data from a number of memory cards were being uploaded.

Jason Stephen, the president of the Progressive Conservatives, took the stage in Woodstock Monday night to challenge what then appeared to be a razor-thin Liberal lead.

Sound: PC President Jason Stephen in Woodstock 9.22.14 on results of New Brunswick election

Townsquare Media

As of early Tuesday morning,  the Tories had not yet conceded defeat and were calling for a hand re-count of the results. Brian Gallant, at age 32,  is set to become the youngest premier in provincial history.

Winners throughout various ridings in Carleton, Victoria and Madwaska Counties include Progressive Conservatives David Alward, Carl Urquhart, and Madeleine Dubé and Liberals Andrew Harvey, Chuck Chiasson, Gilles Lepage and Francine Landry.

The election also made history as David Coon won in Fredericton South and becomes the first-ever MLA elected from the Green Party in New Brunswick.