The government expressed disappointment at the “unhelpful” verdict, handed down over the case brought by two men suspected of terrorism-related activities, saying it would make it harder to keep the country safe.
The court ruled that a person could not be denied bail solely on the basis of secret evidence.
The judges concluded such applications should be treated the same as “control order” cases, where terrorism suspects must be given an “irreducible minimum” of information about the case against them, the Press Association reported.
The decision is another judicial defeat for ministers over security measures, beefed up after the Sept. 11 attacks amid much criticism from human rights campaigners.
“I am surprised and disappointed that the court has made this ruling. My sole objective is protecting the public and this judgment will make that job harder,” said Home Secretary Alan Johnson.
He said the two suspects, a Pakistani student known as XC and an Algerian referred to as U who face deportation on the grounds they pose a risk to national security, would remain in custody while he sought permission to appeal the verdict.
XC was one of 12 men arrested amid great publicity by counter-terrorism police in April this year but later released without charge as there was insufficient evidence. The men were then told they would be deported instead.