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.
ITV News' Political Editor Tom Bradby has this report:
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."