Radical Muslim cleric Abu Qatada will be released on bail within days despite posing a risk to national security, a judge has ruled.
A judge at the Special Immigration Appeals Commission in London said that Abu Qatada, who was once dubbed Osama bin Laden's right-hand man in Europe, could be released in days under stringent conditions after six years in custody.
The British government wants to keep him in a high-security prison while continuing its fight to have him deported. He has been held in Long lartin high-security prison.
The bail conditions will be similar to those set in 2008, with Qatada confined to his home for all but two one-hour periods each day.
He will also be allowed to take one of his children to school.
Home Office lawyers had opposed attempts to bail him while he fights deportation to Jordan.
The European Court of Human Rights says if he were deported, then Jordan might use evidence obtained by torture.
His lawyers described his six-and-a-half-year detention as "unprecedented in the modern era."
Ed Fitzgerald QC, representing Qatada, told an immigration judge in central London that Qatada had now been held for six-and-a-half years while fighting deportation.
He told the Special Immigration Appeals Commission (Siac) that that was "against a background of almost nine years detention without charges on the grounds of national security".
Mr Fitzgerald said: "The detention has now gone on for too long to be reasonable or lawful and there is no prospect of the detention ending in any reasonable period.
"However the risk of absconding, however the risk of further offending, there comes a point when it's just too long
Tim Eicke QC, for the home secretary, said there was "no indication here from the appellant that he has changed his views or his attitude to the UK and the threat he poses to it".
"The risk he posed in May 2007 and 2008 is the risk he poses today," added Eicke.