An Egyptian man who has lived for 13 years branded as a terrorist threat to Canada on secret evidence he's never seen is anxiously awaiting a key ruling in the long-running saga expected any day now.

Federal Court Judge Edmond Blanchard will decide on the validity of a national security certificate imposed on Mohamed Mahjoub in a case that has exposed serious flaws in Canada's security apparatus.

"I am nervous a little a bit," Mahjoub admitted Wednesday.

"At the same time, I'm optimistic about the outcome of the court's decision."

The decision should actually comprise three parts: whether the federal government violated Mahjoub's constitutional rights; whether the proceedings against him amounted to an abuse of process; and whether the security certificate itself is reasonable.

"It's the final ruling both on the merits as well as on the constitutional and abuse challenges," Yavar Hameed, one of Mahjoub's lawyers, said from Ottawa.

Mahjoub, 53, a Toronto father of three, has been fighting government allegations that he was a ranking member of a terrorist group in Egypt that may never have existed, the Vanguards of Conquest.

He also worked on an agricultural project in Sudan run by al-Qaida leader Osama bin Laden in the early 1990s. His lawyers have maintained it was a legitimate business at the time.

Mahjoub has been under a national security certificate, which allows for indefinite detention without charge or trial, while Canada tried to deport him to Egypt, where he says he would be tortured.

Records were destroyed

What has emerged over years of hearings is, among other things, that the Canadian Security Intelligence Service destroyed the original records it used as a basis for claiming Mahjoub poses a threat.

In addition, the spy service admitted foreign agencies that provided intelligence to Canada were linked to torture, but made no effort to filter out the information.

Security officials also admitted they repeatedly listened in to Mahjoub's calls with his lawyers in violation of the sacrosanct concept of solicitor-client privilege.

The upshot, his supporters maintain, is the proceedings are irredeemably tainted and the evidence against him flimsy at best.

The government, his lawyers say, willingly violated the Charter and subverted the judicial system for its own ends.

Blanchard's ruling may not be the last word, with an appeal likely no matter which way it falls.

However, Hameed said he hoped a ruling in his client's favour would put the case to rest once and for all.

"There will be too many fundamental issues for the certificate to be salvaged and more broadly, for the process to be salvaged," Hameed said.

Blanchard's ruling is expected to reveal his assessment only in broad outline, with detailed written reasons to follow so they can be vetted for national security reasons before being made public.

Mahjoub arrived in Canada in 1996 and was accepted as a refugee. He was arrested in June 2000.

Released in 2007 under stringent house-arrest conditions, he opted to return to prison two years later rather than subject his family to the intrusive restrictions.

In 2008, the Supreme Court of Canada ruled the security certificate regime unconstitutional, but the government amended the law and reimposed one on him and four other Muslim foreigners.

He was finally released in November 2009, again under rigid bail conditions. Since then, the courts have eased the restrictions substantially, but he remains far from free.