In legal papers filed late Friday, Justice Department lawyers said it would be impossible to defend the legality of the spying program without disclosing classified information that could be of value to suspected terrorists.
National Intelligence Director John Negroponte invoked the state secrets privilege on behalf of the administration, writing that disclosure of such information would cause "exceptionally grave damage" to national security.
The administration laid out some of its supporting arguments in classified memoranda that were filed under seal.
The government's motion, widely anticipated, involved two cases challenging an NSA program allowing investigators to eavesdrop on Americans who communicate with people outside the country suspected of terrorist ties.
In New York, the Center for Constitutional Rights has asked a judge to stop the program, saying it was an abuse of presidential power. The American Civil Liberties Union and other groups have filed a similar lawsuit in Detroit.
For decades, U.S. law enforcement and intelligence agencies have been required to seek court approval before using electronic surveillance on Americans. That was not done by the NSA in the program at issue, but President George W. Bush has said the eavesdropping was made legal by a congressional resolution passed after the Sept. 11 terrorist attacks.
Shayana Kadidal, an attorney for the Center for Constitutional Rights, called the administration's motion "undemocratic."
Ample safeguards could be put in place to allow the case to continue without disclosing classified information, he said. The Center has also argued that the court already has enough information in hand to decide whether the spying program was legal, based on admissions the administration has already made about the effort.
"The Bush administration is trying to crush a very strong case against domestic spying without any evidence or argument," he said in a written statement. "Can the president tell the courts which cases they can rule on? If so, the courts will never be able to hold the president accountable for breaking the law."
Justice Department attorneys said in their legal brief that the legality of the president's actions could only be properly judged by understanding "the specific threat facing the nation and the particular actions taken by the president to meet that threat."
"That understanding is not possible without revealing to the very adversaries we are trying to defeat what we know about them and how we are proceeding to stop them," they wrote.
The administration's motion occurred the same day the Senate approved Air Force Gen. Michael Hayden to lead the CIA.
Hayden, who headed the National Security Agency for several years, for the debate about the Bush administration's domestic eavesdropping program. Some Democrats and civil-liberties advocates argue the monitoring was illegal.
As head of the NSA from 1999 to 2005, Hayden oversaw the program. His defenders say he was relying on the advice of top government lawyers.