OTTAWA -- A former spy service employee who helped compile the case against accused terrorist Mohamed Mahjoub says he didn't rely on information tainted by torture.

The retired Canadian Security Intelligence Service employee, known only as CSIS Witness No. 3, told a Federal Court hearing Tuesday there was no indication the information he drew from the spy agency's data banks was obtained through brutal methods.

"If I knew information came from torture, I would not use it," the witness said under questioning from Yavar Hameed, a lawyer for Mahjoub.

The federal government is trying to deport Mahjoub, 52, using a national security certificate, claiming he was a high-ranking member of an Islamic terrorist organization.

The Egyptian-born man, married with three children, came to Canada in 1995 and attained refugee status.

He once worked as deputy general manager of a farm project in Sudan run by Osama bin Laden, who would later spearhead the Sept. 11, 2001, attacks on New York and Washington.

Mahjoub was interviewed by CSIS on six occasions between August 1997 and March 1999, each time denying any involvement in Islamic extremism.

He was arrested in June 2000 under a security certificate -- a rarely used immigration tool for deporting non-Canadians considered a risk to the country. But CSIS had to start over after the Supreme Court of Canada ruled the certificate process unconstitutional in 2007 and the government subsequently revamped the law.

CSIS Witness No. 3, a retired spy service veteran, was hired on contract in September 2007 to rewrite the security intelligence report underpinning a revised certificate against Mahjoub.

Though an intelligence veteran, the witness acknowledged Tuesday he had "no idea" what a security certificate was upon beginning the job. He pored over as many as 900 documents printed off from CSIS data banks as well as the contents of a four-drawer filing cabinet.

The witness testified Tuesday by video link from Halifax in a court proceeding that will ultimately determine whether the security certificate naming Mahjoub is valid. While the public and media could hear the man's voice, his face was concealed from view.

Hameed pressed the former CSIS employee as to how he could be sure the information from allied agencies he relied upon was not tainted, given that CSIS data banks contain material received from countries known to conduct abusive interrogations.

The lawyer noted that CSIS policy at the time allowed it to use information derived through torture as long as it could be independently corroborated.

The CSIS witness said sometimes there would be notes attached stating explicitly that the information was not torture-derived. In other cases, he suggested, it was information gleaned from physical surveillance or communication intercepts that was unlikely to involve any mistreatment.

Asked what he would do if he couldn't tell how the information was obtained, the witness said, "That would have to go up the line to my supervisors."

Final decisions on what information could be used in the security intelligence report "were made above me," he added.

But the witness stressed he saw "no indication" the CSIS materials were torture-tainted.

During a break in the hearing, Hameed called it "mind-blowing" the witness would maintain that position.

The question is how serious an effort CSIS made to determine whether the information used to support its case against Mahjoub was the product of torture, said Hameed. "And I think that this witness shows that it wasn't really a serious effort."

Mahjoub, on release from prison under strict conditions, attended the Ottawa hearing, slated to continue two more days.

"In my opinion the case should be quashed completely," Mahjoub said. "There is no fair trial whatsoever at all in my case."

The Federal Court recently ruled that summaries of wiretap information used against Mahjoub must be tossed out because CSIS destroyed the original records.

Earlier, the court ordered 11 federal lawyers and assistants to quit the case because the government inadvertently walked off with Mahjoub's confidential legal files.