The law lords heaped embarrassment on the Government over its anti-terror strategy for the second time in a year as they ruled that evidence obtained by torture should never be used in British courts.
In a landmark ruling, they demanded that the detention of eight foreign terrorist suspects should be re-examined by the secret anti-terror courts in case the crucial evidence against them had been extracted by torture.
Although Charles Clarke, the Home Secretary, insisted the decision would not affect detainees already in custody, it raises the possibility that they could eventually be released.
And it leaves a serious question mark over government attempts to win promises from north African countries that they will not mistreat any terrorist suspects deported from Britain.
The law lords' unanimous, and strongly worded verdict comes 12 months after they ruled that the indefinite detention of foreign nationals was illegal and forced ministers to draw up fresh legislation to replace it.
Yesterday they left the Government with a fresh headache as they criticised the willingness of the state to countenance the use in court of information extracted under duress.
Lord Bingham of Cornhill, the former Lord Chief Justice, who headed the panel of law lords, said the English law had regarded "torture and its fruits" with abhorrence for more than 500 years.
He said he was "startled, even a little dismayed" that "this deeply rooted tradition and an international obligation solemnly and explicitly undertaken" could be overriden by the Special Immigration Appeals Commission (SIAC), which oversees the detention of terror suspects.
Lord Hoffmann, a fellow law lord, said the use of torture corrupted and degraded the state that used it and the legal system that accepted it. In a reference to Guantanamo Bay, he said that many Americans have felt their country "dishonoured" by its use of torture outside its own jurisdiction and the practice of moving suspects to countries where torture is practised.
The case was brought by eight foreign terrorist suspects - the majority Algerian - originally held in Belmarsh prison, who claimed the evidence against them was in part based on information obtained by torture. Most are still in detention pending deportation once the Government has negotiated agreements that they will not be harmed after their return.
Last year, the Court of Appeal found against the detainees by a majority of two to one, ruling that the state had no obligation to investigate how evidence was produced. But the ruling was overturned by the law lords yesterday, who stressed common law developed over centuries should take precedence over SIAC's practices.
Gareth Peirce, the solicitor who represented most of the men, said: "It's an appalling state of affairs we've had to argue for four years that evidence which could be the product of torture should not be used in court."
Shami Chakrabarti, the director of Liberty, said: "This is an incredibly important day, with the law lords sending a signal across the democratic world that there is to be no compromise on torture. This is what distinguishes us from dictators and terrorists."
Amnesty International said: "The authorities have shamefully sought to defend the indefensible."
But Charles Clarke, the Home Secretary, said: "We accept this judgment, which will have no bearing on the Government's efforts to combat terrorism. We have always made clear we do not intend to rely on or present evidence in SIAC which we know or believe to have been obtained by torture.
"So this issue is hypothetical. The real issue is the test applied. We do not expect this test to affect the outcome of these individual appeals."
WHAT DOES THIS VERDICT MEAN FOR BRITAIN'S TERROR LAWS?
By Nigel Morris
Who are the eight men at the centre of the case?
The only one who has been identified is Abu Rideh, a Palestinian asylum-seeker who is alleged to be a fund-raiser for al-Qa'ida. The other seven - five Algerians, a Tunisian and an Egyptian - are only known by letters of the alphabet. Some are understood to be in custody, pending deportation under immigration powers, and others out on bail.
When were they detained?
Most were picked up in December 2001 under the Anti-Terrorism, Crime and Security Act, which was rushed through Parliament after the attacks of 11 September. It allowed the indefinite detention of foreign nationals deemed a risk to national security. The rest were imprisoned the following year. All were held in Belmarsh high-security jail in South-east London.
Why was their detention controversial?
For two reasons. First, the practice of open-ended detention without trial - otherwise known as incarceration - runs counter to historic standards of natural justice. Second, some evidence used to justify their imprisonment is thought to have been obtained from the intelligence services in Algeria, Egypt and Jordan or from American agents in camps such as Guantanamo Bay, the US base in Cuba.
How long has their legal battle taken?
Backed by 14 human rights groups, 10 detainees challenged their detention three years ago. Until yesterday they suffered a series of setbacks. The Special Immigration Appeals Commission (SIAC), the anti-terror court, ruled that it was entitled to consider evidence obtained through torture. Its decision was backed last year by the Court of Appeal. As the legal process ground on, two of the detainees agreed to leave the country, leaving eight to fight on. In 2004, in a separate ruling, the law lords ruled that indefinite detention was unlawful. The Government responded by bringing in "control orders", amounting to virtual house arrest. The eight were released, but most were re-arrested for deportation.
What was the essence of their argument?
That the European Convention forbids torture and therefore any such evidence obtained through brutal treatment of prisoners cannot be admissible in a British court.
What was the Government's view?
The head of M15, Dame Eliza Manningham-Buller, suggested that information from detainees held by foreign security services "can be accurate and may enable lives to be saved". She said it was impossible to know if information supplied by foreign services had been obtained by the use of torture. Ministers agree.
Does the ruling apply to the police or intelligence services?
No. It focuses on the evidence that can be considered by the courts, including SIAC. Summing up the law lords' view, Lord Nicholls of Birkenhead said: "It would be ludicrous for them to disregard information about a ticking bomb if it had been procured by torture."
How serious a blow is this for the Government?
Ministers were putting a brave face on the decision, but it is a grievous blow.
Will the ruling influence overseas governments?
Impossible to say, but the ruling could resonate in the US, where controversy is growing over Guantanamo Bay and allegations that the US condones torture by flying suspects to secret jails abroad.
* LORD BINGHAM OF CORNHILL
"The principles of the common law, standing alone, in my opinion compel the exclusion of third-party torture evidence as unreliable, unfair, offensive to ordinary standards of humanity and decency and incompatible with the principles which should animate a tribunal seeking to administer justice."
* LORD NICHOLLS OF BIRKENHEAD
"Torture is not acceptable. No civilised society condones its use. Unhappily, condemnatory words are not always matched by conduct. Information derived from sources where torture is still practised gives rise to the present problem."
* LORD HOPE OF CRAIGHEAD
"There are ample grounds for suspecting that the use of torture on detainees suspected of involvement in international terrorism is widespread in countries with whom the security services of the United Kingdom are in contact."