Abu Qatada's deportation is in the hands of the British courts after the Jordanian terror suspect lost his attempt to make a final appeal to Europe's human rights judges.
The radical cleric's lawyers immediately applied for him to be released on bail as it looked likely that deportation proceedings will still take many months.
But Home Secretary Theresa May had a narrow escape as, while they rejected the case, the panel of five judges also ruled that Qatada's appeal on the night of April 17 was within the court's deadline.
The decision means Mrs May was wrong when she claimed the three-month appeal deadline from the court's original decision on January 17 expired on the night of April 16, but the mistake will have no serious repercussions.
Qatada's legal team lodged his appeal late on the night of April 17, which the judges ruled was in time.
As is typical, no reasons were given for the panel's refusal to allow the case to be heard by the Grand Chamber of the European Court of Human Rights in Strasbourg.
Lawyers for Qatada, described by a judge as Osama bin Laden's right-hand man in Europe, also applied to a senior immigration judge at the Special Immigration Appeals Commission for a fresh bail hearing, but no date has yet been set.
Mrs May said: "It has always been the Government's intention that the Qatada case should be heard in the British courts, so I am pleased by the European Court's decision today.
"I remain confident that the assurances I have secured from the Jordanian government mean we will be able to put Qatada on a plane and get him out of Britain for good.
"His case will now go through the British courts."
But shadow home secretary Yvette Cooper said: "It is shocking that the court has confirmed the Home Secretary got the date wrong and took an unacceptable risk with this serious case.
"We are all very lucky that the Home Secretary's major mistake has not led to Qatada's application for appeal being granted.
"Now is the time for Theresa May to apologise for such a potentially catastrophic error of judgment and answer questions as to what led her to make this mistake and why she was adamant she was right."
She went on: "The Government has shown very worrying incompetence and recklessness in dealing with Abu Qatada.
"This cannot be allowed to happen again, and the Government needs to show action will be taken to ensure it does not."
Mrs May is now likely to refuse any application by Qatada's lawyers to revoke his deportation order, but it is still likely to be "many months" before he is put on a plane home.
If the Home Secretary also issues a certificate saying any application by Qatada to revoke the deportation order was "clearly unfounded", his lawyers would make an application to the High Court for a judicial review, which could be decided "in a very few weeks".
But if not, Qatada's legal team could appeal against her decision not to revoke the deportation order to a senior immigration judge at the Special Immigration Appeals Commission and the process could still take "many months".
Qatada's legal team was challenging the court's decision that the 51-year-old could be sent back to Jordan with diplomatic assurances that he would not be tortured.
It is separate from the court's initial bar on deportation, which required the Government to first get assurances from Jordan that evidence gained through torture would not be used against Qatada if he is sent back.
Repeated failed attempts by UK governments over the last 10 years to deport the radical cleric have cost nearly £1 million in legal fees, Government figures show.
No figures have been given for how much Qatada has received in legal aid and some estimates put the cost of keeping Qatada in the UK, either in a high-security jail or closely monitored under strict conditions in the community, along with the legal costs of the fight to deport him, at more than £3 million.
The Prime Minister's official spokesman said: "We are obviously very pleased with the decision. It means that the case will now be heard in a British court and it is clearly our intention still to deport this man.
"We believe the assurances we have from the Jordanian government are sufficient."
Asked whether David Cameron was embarrassed at the court's finding that the Government got the timing of the deadline for Qatada's appeal wrong, the spokesman said: "We had consistent legal advice on that point, which did not change."
Kate Allen, director of Amnesty International UK, said the court's rejection of the appeal was a "disappointing decision and a missed opportunity".
"The Grand Chamber would have been the right body to examine this appeal because it raises fundamental issues about whether 'deportation deals' with countries which routinely use torture should ever be relied on," she said.
Qatada, who is said to have wide and high-level support among extremists, was convicted in his absence in Jordan of involvement with terror attacks in 1998 and faces a retrial in his home country.
He also featured in hate sermons found on videos in the flat of one of the September 11 bombers.
Since 2001, when fears of the domestic terror threat rose in the aftermath of the attacks, he has challenged, and ultimately thwarted, every attempt by the Government to detain and deport him.
- More about:
- Global Politics
- Human Rights
- Judges (court Of Law)
- Osama Bin Laden