The director of the National Security Agency told Congress on Wednesday that "dozens" of terrorism threats had been halted by the agency's huge database of the logs of nearly every domestic phone call made by Americans, while a senator briefed on the program disclosed that the telephone records are destroyed after five years.
The director, Gen. Keith B. Alexander, who heads both the N.S.A. and United States Cyber Command, which runs the military's offensive and defensive use of cyberweapons, told skeptical members of the Senate Appropriations Committee that his agency was doing exactly what Congress authorized after the attacks of Sept. 11, 2001.
General Alexander said he welcomed debate over the legal justification for the program because "what we're doing to protect American citizens here is the right thing." He said the agency "takes great pride in protecting this nation and our civil liberties and privacy" under the oversight of Congress and the courts.
(Read More: NSA Leak Reports Sloppy and Misleading: Andreessen)
"We aren't trying to hide it," he said. "We're trying to protect America. So we need your help in doing that. This isn't something that's just N.S.A. or the administration doing it on its own. This is what our nation expects our government to do for us."
But in his spirited exchanges with committee members, notably Senator Patrick J. Leahy, Democrat of Vermont, General Alexander said he was seeking to declassify many details about the program now that they have been leaked by Edward J. Snowden, a former N.S.A. contractor who came forward to say he was the source of documents about the phone log program and other classified matters.
Senator Dianne Feinstein, the California Democrat who is chairwoman of the Senate Intelligence Committee, was the first to disclose that the records are eventually destroyed. She said that she planned to hold a classified hearing on Thursday on the program. But at the Wednesday hearing, where testimony about the government's planned $13 billion spending on cybersecurity was largely swept aside for a discussion of the surveillance program, Ms. Feinstein also revealed that investigators had used the database for purposes beyond countering terrorism, suggesting it might have also been employed in slowing Iran's nuclear program.
More From The New York Times:
Analysts can look at the domestic calling data only if there is a reason to suspect it is "actually related to Al Qaeda or to Iran," she said, adding: "The vast majority of the records in the database are never accessed and are deleted after a period of five years. To look at or use the content of a call, a court warrant must be obtained."
In a robust defense of the phone program, General Alexander said that it had been critical in helping to prevent "dozens of terrorist attacks" both in the United States and abroad and that the intelligence community was considering declassifying examples to better explain the program. He did not clarify whether the records used in such investigations would have been available through individual subpoenas without the database. He also later walked back the assertion slightly, saying the phone log database was used in conjunction with other programs.
In his testimony, General Alexander said he had "grave concerns" about how Mr. Snowden had access to such a wide range of top-secret information, from the details of a secret program called Prism to speed the government's search of Internet materials to a presidential document on cyberstrategy. He said the entire intelligence community was looking at the security of its networks — something other government officials vowed to do after the WikiLeaks disclosures three years ago.
Under the Prism program, the N.S.A. collects information from American Internet companies like Google without individual court orders if the request is targeted at noncitizens abroad. That program derives from a 2008 surveillance law that was openly debated in Congress.
As part of the review from the fallout of leaks about Prism and the phone program, intelligence agencies will seek to determine whether terrorist suspects have increased their use of code words or couriers, have stopped using networks like Facebook or Skype, or have "gone silent" and can no longer be found, current and former senior American officials said separately from the hearing.
The review, which will most likely last for months to determine the long-term impact of the disclosures by Mr. Snowden, will also include a "cost benefit analysis" of the programs.
"Now that it's out there, it will be looked at in a different way," one of the current officials said. "Everyone's raising questions about whether they have been compromised and whether to continue with them at the same pace. They are wondering whether or not they are going to continue to yield good information."
While senior intelligence officials — including James R. Clapper Jr., the director of national intelligence — have asserted that the disclosures have significantly damaged the government's intelligence capabilities, the current and former officials were far less sure of the lasting impact.
Philip Mudd, a former F.B.I. deputy director for national security, said that there could be some short-term impact on the programs but that terrorists would find it very hard to function without using electronic communications. "Good luck trying to communicate in this world without leaving a digital exhaust — that's not going to happen," he said.
Representative Peter King, Republican of New York, called for the prosecution of journalists who published the classified information in the documents leaked by Mr. Snowden. Mr. King told Fox News he was specifically talking about Glenn Greenwald, the columnist for The Guardian, whom he accused of threatening to release the names of covert C.I.A. agents.
On Twitter, Mr. Greenwald said it was a "lie" that he had made such a threat, and shot back with a reference to Mr. King's past support for the Irish Republican Army: "Only in America can a renowned and devoted terrorism supporter like Peter King be the arbiter of national security and treason," he wrote.
Public opinion, judging by two polls with differently worded questions that yielded different results, is divided over the government's tracking of the communications of Americans. In a Pew Research Center/Washington Post poll conducted June 6-9, 56 percent of Americans said the N.S.A's program tracking the phone records of "millions of Americans" was an acceptable way to investigate terrorism, while 41 percent said it was unacceptable. But a CBS News poll conducted June 9-10, which instead asked about collecting phone records of "ordinary Americans," found that just 38 percent supported it and 58 percent opposed it.