The federal government acted in bad faith in dealing with former librarian's assistant Douglas Gary Freeman when it labelled him a terrorist and linked him to the Black Panther party, a judge has ruled .

The decision was announced this week by Federal Court Justice Anne Mactavish, who reviewed Ottawa’s blocking of Freeman’s application to re-enter Canada.

Federal officials had argued that top-secret evidence not shown to him connected him to the Black Panthers.

“I have determined that Mr. Freeman was unfairly treated in this process in several respects,” Mactavish wrote.

The judge dismissed claims he was a security threat. “No meaningful reasons were provided to explain the rationale for finding Mr. Freeman to be inadmissible to Canada on security grounds.”

In an email, Freeman, 64, said he hopes this means he can finally celebrate Christmas in Toronto with his family. He has an outstanding application from last December requesting a Temporary Residence Permit to spend Christmas with his family.

The Justice department had no immediate comment on the ruling.

In a Toronto hearing last week, Freeman’s lawyer, Barbara Jackman, argued Ottawa withheld evidence and repeatedly denied requests for disclosure to back up claims Freeman had links to terrorist groups or that he was connected to the now-defunct militant Black Panthers.

Freeman still has a second hurdle, however: his criminal record.

In 1969, Freeman wounded Chicago police officer Terrence Knox with three gunshots. He changed his name from Joseph Pannell and fled to Canada in the 1970s.

Freeman said the shooting was a case of self-defence. Knox, who suffered permanent injuries to an arm , died in 2011 at age 63.

In his new life in Toronto, Freeman avoided any brushes with the law as he raised four children and worked at the downtown Toronto Reference Library as a librarian’s assistant.

When his story leaked out, he was extradited to the U.S. and pleaded guilty in February 2008 to one count of aggravated battery. He was sentenced to 30 days in jail and two years’ probation, and was ordered to give $250,000 to charity.

At his hearing, Jackman argued Freeman and his family used the Freedom of Information Act to gather documents suggesting the Canadian Security and Intelligence Service investigated him at least three times and never found any links to terrorism.

Jackman noted no government officers ever interviewed him, since they had concluded in advance that he was not connected to terrorism.

In her ruling, Mactavish said former immigration minister Jason Kenney made “ill-advised” comments on the case, but added she was not persuaded Kenney was personally involved in processing Freeman’s case.

Her comments referenced an exchange on May 1, 2012, in the House of Commons between Kenney and Opposition Leader Thomas Mulcair.

Mulcair suggested Kenney had a “double standard” between the handling of Freeman’s case and that of “the British criminal Conrad Black,” who had received a Temporary Residence Permit.

Kenney replied that Freeman was “a convicted police murderer” and suggested Mulcair wanted Ottawa “to welcome convicted cop killers.”

In a later comment, Kenney said Freeman was “convicted of shooting and I believe blinding a police officer, not killing him, so I should have said police shooter, not police killer.”

“This statement also appears to have been inaccurate, as the police officer had not been blinded, but had been left partially paralyzed in one arm,” Mactavish wrote.

Loading... Loading... Loading... Loading... Loading... Loading...

At Freeman’s hearing, Justice Department lawyer Alexis Singer argued he’s not entitled to protection under the Charter of Rights because he’s not a Canadian citizen.

Singer also argued Freeman isn’t being separated from his wife, children and grandchildren in the GTA because they could move to the U.S. or travel there for visits.

Clarification - October 28, 2013: This article was edited from a previous version that referred to Gary Freeman as a librarian.

Read more about: