Seven Algerians fighting deportation from the UK on grounds of national security won Supreme Court appeals today.
The ruling in their favour by the highest court in the land follows a defeat in the Court of Appeal in 2010 when judges rejected challenges in which they claimed they would be at risk of inhuman and degrading treatment if deported.
The Algerian nationals, all "suspected terrorists", brought cases against decisions of the Special Immigration Appeals Commission (Siac), which in each case upheld a decision by the Home Secretary to deport on the grounds of national security.
At the Court of Appeal their challenges were unanimously rejected by Lord Justice Jacob, Lord Justice Sullivan and Sir David Keene.
But today five justices at the Supreme Court unanimously allowed their appeals.
In their written judgment, Lord Brown pointed out: "It must, of course, now be for Siac to consider what, if any, impact our decision has upon the outcome of these appellants' individual appeals: whether there is a need now to reopen them and what, if any, orders should now be made."
A Home Office spokeswoman said after the decision: "This judgment is based on a narrow point of legal process and does not change our intention to seek the deportation of these men as soon as possible because they remain a national security risk."
Today's ruling was made by Lord Phillips, president of the Supreme Court, Lord Brown, Lord Kerr, Lord Dyson and Lord Wilson.
Lord Brown said the "difficulty" and "dilemma" raised by the case faced the court "with what can only be regarded as the most unpalatable of choices".
He said: "It is lesser evils which the court is searching for here, not perfect solutions."
The appellants, who cannot be named for legal reasons, claimed that they would be at risk of treatment contrary to Article 3 of the European Convention on Human Rights if deported back to Algeria.
At the centre of the appeals was whether or not it was open to Siac to make an "absolute and irreversible" order relating to a witness, which would prohibit the Secretary of State from ever disclosing to anyone anything of his identity or evidence.
One of the appellants wished to adduce evidence from a witness who asserted that - notwithstanding the Algerian Government's official assurances - those in the position of the appellants were likely to be subjected to torture or other ill-treatment on their return.
But the witness was prepared to give evidence in the appellants' appeals to Siac only on one "unalterable" condition - that his identity and evidence would by order remain absolutely and irrevocably confidential to Siac and the parties to the appeals - the appellant and the Home Secretary.
The Home Secretary had argued that such an order can "never be appropriate".
Lord Brown said her fundamental objection to such an order was that she may find herself in possession of information which might suggest the existence of a terrorist threat abroad or some other risk to national security.
However, because of the order, she would be unable to alert the foreign state to the risk, "thereby gravely imperilling future diplomatic relations".
But the Supreme Court ruled that there was the "imperative need to maximise Siac's chances of arriving at the correct decision on the Article 3 issue before them and their need, therefore, to obtain all such evidence as may contribute to this task".
Lord Brown announced that it was open to Siac to make the "absolute and irreversible" order of the kind sought and that "on occasion it may be appropriate to do so".
He said: "This is, I conclude, the least worst option open to us - the lesser of two evils ...
"But at the same time I should make plain that I am far from enthusiastic about such orders and would certainly not expect a rash of them.
"Rather it would seem to me that the power to make them should be most sparingly used."