An Ontario Superior Court judge has declared results of the 2011 federal election in the Toronto-area riding of Etobicoke Centre "null and void."

Conservative MP Ted Opitz had been declared the winner in May 2011, displacing former Liberal MP Borys Wrzesnewskyj by a margin of just 26 votes.

Wrzesnewskyj challenged the election result on the basis of alleged voting irregularities including some people voting twice, and others not on the voters' list casting ballots anyway.

In his 40-page decision, Justice Thomas Lederer noted there were no claims of wrongdoing by either candidate.

"At its core, the case concerns the confidence that Canadians must have in our electoral process. If that confidence is diminished, it follows that our interest in, and respect for, government will be similarly diminished," Lederer wrote.

Opitz expressed his disappointment, issuing a statement after the ruling saying, "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."

Opposition leader Thomas Mulcair said the decision represents the courts catching up the Conservatives who "have been consistently playing fast and loose with the election rules."

The NDP leader said, "This is an encouraging sign that the courts are not going to tolerate any misdeeds and misbehaviour with regards to the fundamental rules of democracy."

Optiz has eight days to file an appeal with the Supreme Court of Canada. The court would then have to hear the case in an "expedited manner and a summary manner," CTV News' Mercedes Stephenson said.

Pending the Supreme Court decision, the issue of who will represent the riding would be put on hold.

If Optiz does not appeal, or if he loses the appeal, there will be a byelection.

"We're certainly ready for the byelection and will be working very had to get Borys back in the House," Interim Liberal Leader Bob Rae said on Power Play.

Wrzesnewskyj's lawyer Gavin Tighe told Power Play that there is no word on whether Optiz will appeal.