The long, painful and messy in-camera trials of Mahmoud Jaballah may have finally come to an end after almost two decades – or so it is to be hoped.

Mr. Jaballah, an Egyptian carrying a false Saudi passport, first arrived in Canada claiming refugee status. Quite likely, he did have a reasonable fear of persecution that would entitle him to the protection of the UN Refugee Convention. But the government also believed he had a whiff of violent religious fundamentalism about him, and a suspicion of guilt by association with jihadists.

So Canada couldn't just send him back to the cruel prisons of Hosni Mubarak's Egypt. But the Canadian authorities also believed they could not allow him to live at large in this country.

Story continues below advertisement

So they decided to detain him, but without trying him.

Within a few years, the fact that several men were being held under "security certificates" in cases more or less like Mr. Jaballah's, for indefinite time periods, without knowledge of all the evidence against them, was realized to be a scandal against Canada's values and the rule of law.

In 2007, the Conservative government introduced the Special Advocates Program, so that some lawyers could examine the evidence against people detained in this way, and act on their behalf, questioning the government's allegations, though without actually disclosing the evidence to the detainees.

Last week, Justice Dolores Hansen of the Federal Court of Canada detailed reasons showing a number of weaknesses in the government's evidence against Mr. Jaballah. For example, a CSIS agent was found to have confused "an Afghan refugee camp" with "a refugee camp in Afghanistan" – not proof that he was ever in Afghanistan. As a result, the most recent security certificate against Mr. Jaballah, who has been under house arrest for some time, has been declared to be unreasonable.

It's a reminder that there should be no Gitmos in Canadian law – no places where the state can do things to you, even if it believes it has good evidence, without the full oversight of the courts.