Army Gen. Keith Alexander said the two recently disclosed programs - one that gathers U.S. phone records and another that is designed to track the use of U.S.-based Internet servers by foreigners with possible links to terrorism - are critical in the terrorism fight.
Intelligence officials have disclosed some details on two thwarted attacks, and Alexander offered some information on other attempts.
He said the NSA was monitoring a known extremist in Yemen who was in contact with an individual in the United States. Identifying that person and other individuals, Alexander said, officials "were able to detect a nascent plot to bomb the New York Stock Exchange. ... The FBI disrupted and arrested these individuals."
The programs "assist the intelligence community to connect the dots," Alexander told the committee in a rare, open Capitol Hill hearing.
Alexander got no disagreement from the leaders of the panel, who have been outspoken in backing the programs since Edward Snowden, a 29-year-old former contractor with Booz Allen Hamilton, disclosed information to The Washington Post and the Guardian newspapers.
Rep. Mike Rogers, R-Mich., chairman of the committee, and Rep. C.A. Dutch Ruppersberger of Maryland, the panel's top Democrat, said the programs were vital to the intelligence community and assailed Snowden's actions as criminal.
"It is at times like these where our enemies within become almost as damaging as our enemies on the outside," Rogers said.
Ruppersberger said the "brazen disclosures" put the United States and its allies at risk.
The general counsel for the intelligence community said the NSA cannot target phone conversations between callers inside the U.S. - even if one of those callers was someone they were targeted for surveillance when outside the country.
The director of national intelligence's legal chief, Robert S. Litt, said that if the NSA finds it has accidentally gathered a phone call by a target who had traveled into the U.S. without their knowledge, they have to "purge" that from their system. The same goes for an accidental collection of any conversation because of an error.
Litt said those incidents are then reported to the Foreign Intelligence Surveillance Court, which "pushes back" and asks how it happened, and what the NSA is doing to fix the problem so it doesn't happen again.
The hearing came the morning after President Barack Obama, who is attending the G-8 summit in Ireland, vigorously defended the surveillance programs in a lengthy interview Monday, calling them transparent - even though they are authorized in secret.
"It is transparent," Obama told PBS' Charlie Rose in an interview. "That's why we set up the FISA court," the president added, referring to the secret court set up by the Foreign Intelligence Surveillance Act that authorizes two recently disclosed programs: one that gathers U.S. phone records and another that is designed to track the use of U.S.-based Internet servers by foreigners with possible links to terrorism.
Obama said he has named representatives to a privacy and civil liberties oversight board to help in the debate over just how far government data gathering should be allowed to go - a discussion that is complicated by the secrecy surrounding the FISA court, with hearings held at undisclosed locations and with only government lawyers present. The orders that result are all highly classified.
"We're going to have to find ways where the public has an assurance that there are checks and balances in place ... that their phone calls aren't being listened into; their text messages aren't being monitored, their emails are not being read by some big brother somewhere," the president said.
A senior administration official said Obama had asked Director of National Intelligence James Clapper to determine what more information about the two programs could be made public, to help better explain them. The official spoke on condition of anonymity because the official was not authorized to speak publicly.
Snowden on Monday accused members of Congress and administration officials of exaggerating their claims about the success of the data gathering programs, including pointing to the arrest of the would-be New York subway bomber, Najibullah Zazi, in 2009.
In an online interview with The Guardian in which he posted answers to questions, he said Zazi could have been caught with narrower, targeted surveillance programs - a point Obama conceded in his interview without mentioning Snowden.
"We might have caught him some other way," Obama said. "We might have disrupted it because a New York cop saw he was suspicious. Maybe he turned out to be incompetent and the bomb didn't go off. But, at the margins, we are increasing our chances of preventing a catastrophe like that through these programs," he said.
Obama repeated earlier assertions that the NSA programs were a legitimate counterterror tool and that they were completely noninvasive to people with no terror ties - something he hoped to discuss with the privacy and civil liberties board he'd formed. The senior administration official said the president would be meeting with the new privacy board in the coming days.