A standard tabulation check has resulted in a flip of results in a closely fought riding north of Toronto.

On Thursday night, preliminary results showed Liberal candidate Sandra Yeung Racco to be the winner in Thornhill by just 85 votes with a total of 21,837 to Progressive Conservative candidate Gila Martow’s 21,752.

However an official tabulation has revealed that Martow in fact won the riding by the same 85-vote margin.

In a release Saturday morning, Elections Ontario said the confusion was due to minor clerical errors.

Speaking with CP24 Saturday, Martow said she learned of the reversal Friday night.

“My campaign manager was at Elections Ontario yesterday with the Liberal campaign manager and they were given the official word but I guess it took a while for Elections Ontario to put out a press release,” Martow said.

Having only served as an MPP for less than four months, Martow said she’s happy to be hanging on to the job.

“It didn’t seem like a very long time, it certainly wasn’t long enough for me,” Martow said. “I’m looking forward to again advocating on behalf of the issues here in Thornhill.”

In a statement issued Saturday afternoon, Yeung Racco said she would request a judicial recount to make sure the official count is accurate.

“It was obviously a disappointment to learn that Elections Ontario has reversed the result reported on election night,” Yeung Racco said in the statement. “Moreover, we are alarmed at the number of what Elections Ontario deemed to be ‘transposition and minor clerical errors’ that led to this decision.”

She noted that the difference between herself and Martow amounts to less than 0.2 per cent of the votes cast in the riding.

“When the results are as close as they were, it is imperative to ensure that every vote was counted properly,” Yeung Racco said.

While the reversal comes as a surprise to an electorate used to seeing results come in minutes after polls close, Elections Ontario said Saturday that the detection of the election-night error is a matter of the system working.

“This is exactly why each retuning officer does an official tabulation the day after or the second day after the election – because they check the math,” Loren Wells, deputy chief electoral officer for Ontario, told CP24 Saturday. “If there are any doubts the Elections Act also provides that an application can be made to a judge for a recount."

She added that “every returning officer in Ontario checks the math because the Thursday night results are completely unofficial.”

Wells said that while official counts might reveal discrepancies in other ridings as well, few are likely to result in a change like Thornhill because few other races were as close.

The reversal is the latest development in a six-month-long dance between the two opponents.

Martow and Yeung Racco have been doing battle in the riding since Progressive Conservative MPP Peter Shurman stepped down amid a controversy over his expenses in December of last year.

Martow won the ensuing byelection in February and has served as the MPP since then.

Following the byelection loss, Premier Kathleen Wynne said the result was not representative of how people would vote in a general election and vowed to take the riding back.

The result change for the riding does not affect the Liberals’ majority in the provincial legislature.

Yeung Racco, who currently serves as a city councillor in Vaughn, is married to Mario Racco, who held the riding for the Liberals before he was upset by Shurman in the 2007 election.

In April she told cp24.com that she had not yet decided whether to seek re-election in the upcoming municipal election in October.

@Josh_F is on Twitter. Remember for instant breaking news follow @cp24 on Twitter.