Radical preacher Abu Qatada has lost his latest high court bid for a judicial review of his deportation to Jordan.
Qatada's lawyers had asked two judges to challenge his detention by home secretary Theresa May.
Lord Justice Hughes and Mr Justice Silber said the court was "quite satisfied" that Qatada's judicial review application should be dismissed.
Lawyers for Qatada indicated they would consider taking the case on to the court of appeal.
The Special Immigration Appeals Commission (Siac) denied bail to Qatada ahead of a previous deportation appeal in October, saying having him on the streets during the Olympics would be "exceptionally problematic".
If his appeal were successful, Qatada, once dubbed Osama bin Laden's right-hand man in Europe, would have been released within a matter of days.
His lawyers had applied for a judicial review of the bail ruling and a writ of habeas corpus - a common law procedure developed in medieval times which effectively calls for a detained person to be brought before a court to rule if he is being unlawfully held.
Siac ruled two months ago that Qatada's detention was lawful.
Qatada's lawyer, Edward Fitzgerald QC, previously told the two judges: "The detention has already gone on for so long as to be disproportionate and unlawful.
"There comes a point where detention is just too long, and this is the longest period of administrative detention, so far as we know, in modern English history.
"It cannot be right, when we are already at seven years - and when there is an inevitable likelihood this it is going to go on for at least another year."
Qatada, 52, is being held at Long Lartin Prison in Worcestershire.
Qatada, also known as Omar Mahmoud Mohammed Othman, has fought deportation from the UK since 2001 at a cost to the taxpayer of nearly £1m.
He faces charges of plotting bomb attacks in Jordan in 1999 and 2000.