The new Home Secretary remained defiant yesterday in the face of a Law Lords ruling which outlawed his predecessor's emergency anti-terror measures.

In an overwhelming condemnation of David Blunkett's Anti-Terrorism, Crime and Security Act, the Law Lords ruled that indefinite detention of foreign nationals without trial contravened human rights laws.

Lord Hoffmann went so far as to suggest that the Act itself was a bigger threat to the nation than terrorism.

But the new Home Secretary, Charles Clarke, in a statement to MPs, said: "My primary role as Home Secretary is to protect national security and to ensure the safety and security of this country."

He said the nine detainees who took their case to the House of Lords, the highest court in the land, would remain in prison.

"It is ultimately for Parliament to decide whether and how we should amend the law," he said.

Mr Clarke said the internment provisions would remain in force until Parliament agreed the future of the law. "I will not be revoking the certificates or releasing the detainees, whom I have reason to believe are a significant threat to our security."

Lawyers and civil rights groups said that although the Law Lords had no powers to strike out the Act, their eight-to-one ruling in favour of the nine detainees held for three years on suspicion of links with terrorism, left the Government in an impossible situation.

Mr Clarke said he would be asking Parliament to renew the legislation in the New Year. In the meantime, ministers would study the judgment to see whether it was possible to modify the legislation "to address the concerns raised by the House of Lords".

The ruling, which said that the internment laws were unlawful, came as a further humiliation to David Blunkett, who introduced the emergency measures in response to the September 11 terrorist attacks on Washington and New York in 2001.

Solicitor Gareth Peirce, the human rights champion who represented eight of the detainees, said: "It will provoke an enormous constitutional crisis if the Government fails to act swiftly.

"The Government has to take steps to withdraw the legislation and release the detainees."

Shadow Home Secretary David Davis said: "This judgment should not come as a surprise. We warned the Government at the time they passed this legislation that it would be difficult to justify."

Lord Bingham, the former Lord Chief Justice who headed a panel of nine Law Lords, rather than the usual five, because of the constitutional importance of the issues, said in his ruling he accepted that great weight should be given to the judgment of the Home Secretary and Parliament.

But he said he had decided to allow the appeals and quash the opting out from the Human Rights Act. The anti-terrorism law was incompatible with European Convention rights because it discriminated against foreign nationals and was disproportionate to the threat it was meant to counter.

Lord Hoffmann said in his ruling: "This is one of the most important cases which the House has had to decide in recent years.

"It calls into question the very existence of an ancient liberty of which this country has until now been very proud: freedom from arbitrary arrest and detention."

In response to Government arguments that the anti-terrorism Act was necessary to protect the life of the nation, Lord Hoffmann said: "The real threat to the life of the nation, in the sense of a people living in accordance with its traditional laws and political values, comes not from terrorism but from laws such as these.

"That is the true measure of what terrorism may achieve. It is for Parliament to decide whether to give the terrorists such a victory."