London: A man convicted of terror charges and believed by police to pose a threat to the UK is to be released from prison after Home Secretary Theresa May lost a court case to keep him in jail until he can be deported.
The foreign national, known in court as N2, has spent years behind bars on terror-related offences and is still believed to pose a threat to the public.
But a judge has now overruled the Home Secretary's argument that N2 should be remanded in custody because he is a threat to national security, the Independent reported.
The case has some echoes of the infamous Abu Qatada case two years ago, when the Home Secretary spent years trying to deport him to Jordon after he completed his sentence in the UK.
N2 was convicted of Islamist terror-related offences several years ago and his long sentence has expired.
With his potential release pending, May signed a deportation order on July 15. Earlier this week, Home Office lawyers asked a judge to remand him in custody until those proceedings are over.
May argued that N2 was not only a threat to the public but also a flight risk. But at the Special Immigration Appeals Commission hearing, Justice Irwin overruled the Home Secretary, ruling that N2 should be freed.
The Bureau of Investigative Journalism, which first reported the judge's decision, said he was due to be released.
Granting him bail, the judge ruled that he must wear a tag and comply with strict conditions, but he will be able to live near his family and be free to mingle in the community.
The bail conditions also restrict him from large transport hubs such as international railway stations? and airports, and they forbid him from possessing any computer equipment or mobile phone. He is only allowed a landline telephone.
However, the public has been barred from knowing who or where he is after the judge banned the media from identifying him, and from publishing any details about his original case.
At the Siac hearing, Tim Eicke QC, for the Home Office, argued N2 would be a high flight risk as well as a risk to national security were he to be granted bail, the daily said.
N2's lawyer, Daniel Furner, said there was nothing in his recent history to suggest he would flee.
Justice Irwin said the risk N2 would abscond was not enough to justify his continued detention.
A hearing date for his appeal against the deportation order has not been set.
A Home Office spokesman said: "We pursue every possible avenue to remove foreign nationals who threaten our national security and deportation with assurances is just one weapon in our wider armoury.
"Twelve individuals have been removed via these arrangements to date, including Abu Qatada in July 2013, and we are actively pursuing deportation with assurances in this case."