The British government has lost the latest round of its long-running legal battle to deport radical Muslim cleric Abu Qatada.
Qatada is wanted in his native Jordan after being convicted of terrorism charges in 1999.
Successive British governments have tried for years to get rid of the cleric, who has been in and out of jail since first being arrested in 2001.
Qatada's lawyers have foiled their attempts by claiming that he might not receive a fair re-trial in Jordan, due to the use of evidence against him having been obtained using torture.
Qatada won a last minute appeal against deportation last November.
Earlier this month he was arrested and jailed for breaching bail conditions prohibiting the use of mobile phones and other communications equipment in his house.
Home Secretary Theresa May's legal team have argued in court that he is a "truly dangerous" individual who has escaped expulsion only through errors of law.
But at the Court of Appeal today, three judges unanimously rejected the government's appeal against November's decision by the Special Immigration Appeals Commission to allow him to stay.
They said in their ruling: "The court recognises that (Abu Qatada) is regarded as a very dangerous person but emphasises that this is not a relevant consideration under the applicable Convention law.
"SIAC was entitled to conclude that there is a real risk that the impugned statements will be admitted in evidence at a retrial and that, in consequence, there is a real risk of a flagrant denial of justice."
The Home Office said it would continue its fight to get him deported.
"This is not the end of the road, and the government remains determined to deport Abu Qatada," it said in a statement.
"We will consider this judgment carefully and plan to seek leave to appeal.
"In the meantime we continue to work with the Jordanians to address the outstanding legal issues preventing deportation."