The Supreme Court of Canada upheld most of the country's child pornography law Friday. But it also outlined two exceptions, prompting debate over whether a dangerous loophole has been created for pedophiles.

In a unanimous decision, the court upheld the restriction against the possession of child pornography.

But the court was split over whether there should be exceptions based on freedom of expression.

John Robin Sharpe
John Robin Sharpe

In a 6-3 decision, the majority ruled that people can't be prosecuted for creating photographic or written material designed purely for their own use – as long as real pictures or videos do not show illegal acts.

The case involved John Robin Sharpe, a 67-year old divorced father of two, who was charged with the possession, manufacturing and distribution of child pornography in 1995.

Scott Newark, lawyer for Victims of Crime
Scott Newark, lawyer for Victims of Crime

After Friday's ruling Sharpe remained defiant, vowing to go back to court and plead not guilty to the charges. "This whole thing is a mess based on the moral assumption of certain psychiatrists," he told CBC Newsworld's Don Newman.

The charges were laid after police raided his Surrey, B.C. home and seized photos of naked boys, along with stories he'd written depicting graphic and violent sex with children.

Sharpe's collection of child pornography
Sharpe's collection of child pornography

The retired city planner challenged the ban saying Section 163.1(4) of the Criminal Code violated his right to freedom of expression. He was backed by civil liberties groups who raised concerns about privacy.

The distinctions made in Friday's ruling don't change the fact that all child pornography, including drawings, can incite pedophiles "to fantasize about acting out on their behaviours," according to Scott Newark, a lawyer with the federal government's Office of the Victims of Crimes.

"When you start to get into that kind of analytical approach, what it does is it diminishes, in fact it looks like it ignores, the reality of the risk to children that this material, whether using real kids or not, produces in the sense of future harm to other children," Newark said.

Federal Justice Minister Anne McLellan said she was delighted the top justices upheld the law – calling the exceptions "extremely narrow" and the ruling "a clear victory for the children of our country."

But Mark Hecht of the children's advocacy group Beyond Borders criticized the judgment, arguing that it creates "a loophole for pedophiles" that is unacceptable.

Before the decision, children's rights groups and police officers had argued that a blanket possession law was necessary to protect children from predators.

In 1999 the B.C. Supreme Court ruled in Sharpe's favour, upholding a decision by a lower court. "There is no evidence that demonstrates a significant increase in the danger to children caused by pornography," wrote Justice Duncan Shaw.

About 100 similiar charges have been on hold since the B.C. ruling, which sparked a storm of protest and was immediately challenged by the provincial government.

After Friday's decision the Canadian Alliance predicted it will be difficult to determine which pornography cases fit the exceptions laid out by the high court.

"Social and legal policy should be made by Parliament and not by the courts," said Vic Towes, the party's justice critic. "The Canadian Alliance demands that Parliament have a full review of the exemptions the court has created."

Plans to amend the law were already underway to include outlawing child porn from the Internet, and luring children into sexual activity.

McLellan said she'll be meeting her provincial counterparts to decide what, if anything, needs to be done to address the exceptions outlined by the Supreme Court.