Updated

The Supreme Court of Canada opened the door Wednesday to deporting an Algerian refugee accused of being an al-Qaida sleeper agent.

Mohamed Harkat, a former pizza delivery man, was arrested in 2002 on suspicion of being a member of al-Qaida. He denies the allegations and says he could face torture if returned to Algeria.

The high court also unanimously rejected Harkat's constitutional challenge of security certificates under a seldom-used law for removing non-citizens suspected of involvement in terrorism.

Security certificates allow non-citizens to be held indefinitely without being charged, with the government allowed to keep evidence secret.

Harkat's lawyers argued the security certificate process was unfair because the person named in a certificate doesn't see the full case against them. In its ruling, the Supreme Court said security certificates do not violate the person's right to know and challenge the allegations they face.

In 2007, the Supreme Court struck down the initial security certificate law, but the government has since revamped the security certificate system, allowing the government to introduce special advocates — lawyers with access to secret material who serve as watchdogs and test federal evidence against the person singled out in the certificate.

Harkat's counsel argued during a Supreme Court hearing last year that the special advocates do not make up for weaknesses in the certificate process, noting these lawyers are greatly restricted in what they can say about the case and cannot initiate their own investigations. However, the court ruled that while the special advocates must abide by significant limitations on their ability to discuss a case, the restrictions "do not render the scheme unconstitutional."

Harkat's lawyer Norm Boxall said his client is devastated by the ruling. Harkat can still challenge deportation if he can demonstrate that he would be at risk of torture.

Two other men — Mahmoud Jaballah and Mohamed Mahjoub, both originally from Egypt — could face removal from Canada in long-running certificate cases.

Last year, federal border agents removed an electronic tracking bracelet from Harkat's ankle. He was also given more freedom to travel, but was prohibited from leaving the country and told to check in with authorities regularly