A British court has granted bail to a Muslim cleric accused of having been a leading al-Qaeda figure in Europe.
Last month, the European Court of Human Rights ruled that Abu Qatada, 51, should not be deported to Jordan where he was born because of the risk of evidence gained through torture being used against him.
Lawyers for the preacher told the Special Immigration Appeals Commission on Monday that his continued detention was unreasonable.
The Home Office said it disagreed with the decision and Abu Qatada continued to be a threat to national security.
The BBC reports the government previously opposed attempts to bail him while he fights deportation to Jordan - where he faces terror charges.
Mr Justice Mitting told the Special Immigration Appeals Commission the cleric should be freed within days.
But he said the preacher should now be bailed because his deportation has been blocked by the European Court.
The judge gave Home Secretary Theresa May three months to show that British diplomats had made progress in these negotiations or else Abu Qatada's stringent bail conditions would be revoked.
Ed Fitzgerald QC said earlier his client had been held for 6½ years while fighting deportation.
The BBC reports Abu Qatada will be released in the coming days from Long Lartin prison in Worcestershire, and taken to an address in London, which he would be allowed to leave only for two one-hour periods a day.