Nine judges in the House of Lords ruled in favor of a group of foreign men jailed without charge for up to three years. Their lawyers say their detention is a violation of human rights.
The British government had argued that the detention without trial of some terrorist suspects is a tough but necessary measure to protect a free society from the threat of devastating attacks.
The Home Office said Parliament would now decide whether detention without trial continues, and that the suspects would remain in prison for the time being.
The nine law lords — members of the House of Lords who constitute Britain's highest court of appeal — voted 8-1 against the measures brought in after the attacks of Sept. 11, 2001, under which foreign terrorist suspects may be detained indefinitely without charge or trial if they cannot safely be removed to another country
Lord Bingham of Cornhill presented the majority opinion.
"The measures unjustifiably discriminate against foreign nationals on the grounds of their nationality or immigration status and are not strictly required since they provide for the detention of some but not all of those who present the same risk," he said.
He was referring to the distinction the law makes between British suspects and foreigners. The law applies only to terror suspects who are not British citizens and whose lives would be endangered if they were deported.
Seventeen people have been detained under the provision of the Anti-Terrorism, Crime and Security Act. Eleven remain in custody; three have been freed, one released but detained under other powers and two voluntarily deported from Britain.
The government has not told the detainees why they were arrested, or on what evidence. Previous attempts to challenge their detention in the courts and at special tribunals have failed.
The law — which required the government to opt out of sections of the European Convention on Human Rights — allows police to arrest and hold foreign nationals if there are "reasonable grounds to suspect" links to terrorist groups. That is a far lower requirement than the standard of proof that would be required to convict them of a crime.
The suspects held in Britain have access to lawyers. They are not allowed to hear all the evidence against them, nor can their lawyers access all the top secret documents and testimonies in the case. But the attorney general has appointed special advocates who have been checked by the MI5 security agency, to act on their behalf.
Lord Bingham said he would quash the opt-out order and declare section 23 of 2001 Anti-Terrorism, Crime and Security Act incompatible with the European Convention.
One of the detainees, identified only as "A," welcomed the ruling.
"I hope now that the government will act upon this decision, scrap this illegal 'law' and release me and the other internees to return to our families and loved ones," he said in the written statement released by Gareth Peirce, one of the lawyers acting for the suspects.