Jack Straw has attacked the decision by Britain's highest court that detaining foreign terrorist suspects without trial breaks human rights laws.
Mr Straw denies there is a 'constitutional crisis'
The foreign secretary said the right to life was the "most important liberty" and the government had a duty to protect people from terrorism.
Law lords were "simply wrong" to imply the men were being held arbitrarily.
New Home Secretary Charles Clarke vowed the nine men would remain in prison while the law was being reviewed.
The House of Lords ruled by an eight to one majority in favour of appeals by the men - dealing a major blow to the government's anti-terror policy.
But Mr Straw denied it amounted to a "constitutional crisis".
He said those held had a right of appeal to the special immigration appeal tribunal and the decision to hold the suspects was upheld by that court.
"The law lords are simply wrong to imply that this is a decision to detain these people on the whim or the certificate of the home secretary," he told BBC Radio 4's Today programme.
The foreign secretary insisted it was for Parliament, and not judges, to decide how best Britain could be defended against the threat of terrorism.
But Liberal Democrat peer Lord Carlile, the government's independent reviewer of anti-terrorism laws, said it was possible some of the detainees could now be released.
He said the Law Lords' ruling was an "embarrassment" for the government and major changes were needed to the law.
The ruling came on Charles Clarke's first day as home secretary following David Blunkett's resignation.
In a statement to MPs, Mr Clarke said: "I will be asking Parliament to renew this legislation in the New Year.
"In the meantime, we will be studying the judgment carefully to see whether it is possible to modify our legislation to address the concerns raised by the House of Lords."
The detainees took their case to the House of Lords after the Court of Appeal backed the Home Office's powers to hold them without limit or charge.
The government opted out of part of the European Convention on Human Rights concerning the right to a fair trial in order to bring in anti-terrorism legislation in response to the 11 September attacks in the US.
Any foreign national suspected of links with terrorism can be detained or can opt to be deported.
But those detained cannot be deported if this would mean persecution in their homeland.
On Thursday, Lord Bingham - a senior law lord - said the rules were incompatible with the European Convention on Human Rights as they allowed detentions "in a way that discriminates on the ground of nationality or immigration status" by justifying detention without trial for foreign suspects, but not Britons.
Lord Nicholls of Birkenhead, in his ruling, said: "Indefinite imprisonment without charge or trial is anathema in any country which observes the rule of law.
In a statement, detainee 'A' in Woodhill Prison said: "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."
The case was heard by a panel of nine law lords rather than the usual five because of the constitutional importance of the case.
Solicitor Gareth Pierce, who represents eight of the detainees, claimed the detention had driven four of the detainees to "madness", saying two were being held in Broadmoor hospital.