US Attorney General John Ashcroft says the Justice Department is likely to appeal against a court ruling attacking the Patriot Act as unconstitutional.
Mr Ashcroft said the Patriot Act is not unconstitutional
A US district court ruled on Wednesday that surveillance provisions in the act violated individual rights.
Mr Ashcroft said he did not know the specifics of the ruling but was "almost" certain it would be appealed.
The ruling is the second attack by a US court on the Patriot Act, seen as a cornerstone in the "war on terror".
In January, a US federal judge ruled that a section of the Patriot Act that criminalised those who gave "expert advice or assistance" to terrorist groups was too vaguely phrased and violated liberties enshrined in the US constitution.
Responding to the latest court ruling against the act, Mr Ashcroft said, "We believe the act to be completely consistent with the US constitution."
New York District Judge Victor Marrero said on Wednesday that the act violated the constitution by allowing federal investigators to gather telephone and internet records from private companies and then prevent those companies from revealing that they disclosed this information about their customers.
He said the act also violates the constitution's Fourth Amendment by preventing any legal challenge to such surveillance.
Judge Marrero acknowledged the government must be empowered to defend national security, but warned that this must not be at the cost of personal security, which is "especially prized in our system of justice".
A footnote to the ruling said courts must apply "particular vigilance to safeguard against excesses committed in the name of expediency".
The American Civil Liberties Union praised the ruling, citing it as a "landmark victory" against "excessive government secrecy and unchecked executive power".
US President George W Bush has argued the case for Congress to renew the Patriot Act before it expires next year.
Introduced in the wake of the 11 September 2001 attacks on New York and Washington, the act grants government agencies extraordinary powers to spy on and prosecute those suspected of terrorism.