The rare decision by Ontario Superior Court Justice Thomas Lederer upends the narrow 26-vote win by Conservative Ted Opitz over former Liberal MP Borys Wrzesnewskyj, and means a byelection will have to be called if the ruling stands.
Lederer made it clear the voting irregularities — essentially clerical errors — were not the product of fraud or other intentional wrongdoing.
"This election was conducted by responsible public officials and well-intentioned individuals, who were motivated by nothing less than a desire to do the job properly," Lederer said in his 41-page decision.
"What this case represents is an opportunity to learn, and for the process to evolve in order to guard against the particular problems that appeared in this case."
Among the problems the judge identified was the failure to properly register voters and a failure to properly vouch for voters who showed up to cast ballots.
As a result, he set aside a total of 79 votes — well in excess of Opitz's 26-vote winning margin.
Reached in Sambir, Ukraine, Wrzesnewskyj said the decision went a long way to restoring some of the confidence in the system eroded in the election last May.
"A lot of disturbing reports came out of the last federal election and Canadians' confidence was shaken," Wrzesnewskyj said.
"That's why it was so important that people not get cynical and see that we have a system that allows us to address those sorts of issues."
Wrzesnewskyj called on Prime Minister Stephen Harper to call a byelection as quickly as possible and the Liberal party said it was ready for one.
Opitz expressed disappointment with the decision, but noted he and his campaign followed the rules.
"This is not about me — it's about 52,000 people who followed the rules, cast their ballots and today had their democratic decision thrown into doubt," Opitz said.
During the case argued last month, Wrzesnewskyj's lawyers argued the integrity of the electoral system depended on strict adherence to the rules, even if they are just procedural.
Wrzesnewskyj's challenge to the results — unrelated to the robocall and voter-suppression scandals — was the first time a court was asked to rule on a contested election under Part 20 of the Canada Elections Act.
The section allows a voter or candidate to seek to invalidate a riding vote if there were "irregularities, fraud, corrupt or illegal practices that affected the results," but only irregularities were alleged.
Chief electoral officer Marc Mayrand argued the provisions should only be used in serious cases of impropriety and that procedural errors simply didn't warrant setting aside the election result.
The court, the judge said, walked a "thin line" between ensuring the integrity of the system while also ensuring that no eligible voters are disenfranchised simply because of clerical errors.
However, there were "fundamental" requirements needed to retain confidence in the system, among them one that those who vote are qualified to do so.
"If we give up these foundations of our electoral system, we are risking a loss of confidence in our elections and in our government," the judge said.
Liberal Leader Bob Rae said "our democracy was tested and perhaps undermined" during the election.
"Reports and allegations of election fraud are widespread and there are many cases still under investigation," Rae said.
"But we are confident that a byelection in Etobicoke Centre would help greatly in reaffirming the strength of our electoral system and Canada’s democracy."
The decision has little impact on Harper's majority Conservative government.
There apparently have been half a dozen cases in Canadian history of a court throwing out federal election results.
The last time a court did so was 1988, when an Ontario Supreme Court judge found enough questionable ballots to nix a win in York North riding near Toronto by Liberal Maurizio Bevilacqua, who reclaimed his seat with a bigger margin of victory in the subsequent byelection.
Also on HuffPost