In the ruling, Federal Court Judge Edmond Blanchard ordered that summaries of wiretap information used against Mohamed Mahjoub be excluded, because intelligence officials destroyed the original records.
"They will have to revise the security intelligence report, which is the basis of their case," defence lawyer Paul Slansky said in an interview.
"If (Blanchard) has excluded so much that they have no case left, that means that the case should be thrown out."
Ottawa accuses Mahjoub, 51, an Egyptian citizen and father of three living in Toronto since 1995, of posing a threat to national security.
Based on secret evidence, the government first slapped him with a national security certificate in 2000, and he has been imprisoned or under house arrest since then.
Part of Ottawa's evidence against Mahjoub are summaries of intercepted conversations between 1996 to 2001.
Mahjoub's special advocates — lawyers with top-security clearance who are given access to the secret evidence in closed session — argued to have the summaries thrown out where Canada's spy agency destroyed the original records. Government lawyers opposed their motion.
In his decision — part of which was redacted — Blanchard noted the Federal Court of Appeal had ordered summaries excluded in the case of Algerian citizen, Mohamed Harkat, who is also under a national security certificate.
Blanchard said the issue was that the destruction of the originals violated Charter rights to disclosure. He also said there was no way to measure the accuracy of the summaries.
"Without the original records of the conversations, Mr. Mahjoub has no means of verifying the accuracy or reliability of the summaries," Blanchard said.
"The summaries of conversations to which Mr. Mahjoub was not privy and for which the original records have been destroyed should be excluded from the evidentiary record."
Slansky, who is Mahjoub's public lawyer, said it was not immediately clear because of the secrecy just how much of the government's case has gone up in smoke but said it could be a significant part.
Mahjoub, who has never been charged with any crime in Canada, is contesting the reasonableness of the certificate.
Earlier this month, Blanchard ordered 11 federal lawyers and assistants to step down from the case because the government inadvertently took Mahjoub's confidential legal files. However, Blanchard stopped short of ordering a stay in proceedings, a decision now under appeal.
The government alleges Mahjoub had high-level links to a terrorist organization in Egypt, which he fled in the mid-1990s.
Documents obtained earlier by The Canadian Press show Canada's spy agency conceded several years ago that most of its evidence was derived from sources linked to torture.
The government insists Mahjoub still has extremist beliefs despite having had no contact with his former associates for 16 years.
Canada has been unable to deport him because he could be tortured in Egypt.
Mahjoub's supporters planned to demand his release at a rally in Toronto Tuesday marking the 12th anniversary of his arrest.