The National Security Agency’s power to scrutinize Americans' telephone records has helped thwart more than 50 potential terrorist plots, including plans to bomb both the New York City subway system and the New York Stock Exchange, officials said Tuesday as they defended the controversial snooping program to a panel of lawmakers.

In a rare public hearing, top officers from the NSA, Justice Department and the Department of National Intelligence provided a detailed description of the secretive electronic surveillance program created in the wake of the Sept. 11, 2001, terrorist attacks. The program was leaked earlier this month by disgruntled government contractor Edward Snowden.

“These programs are immensely valuable for protecting our nation and securing the security of our allies,” Gen. Keith Alexander, the NSA director, told the House Intelligence Committee.

The hearing was the result of startling revelations by Snowden, a former Booz Allen Hamilton contractor who said he had the capability of using NSA surveillance program to wiretap anybody, including the president.

Snowden’s claims ignited a controversy about American privacy rights and some lawmakers are now pushing to declassify secretive court rulings that allow the government to access private phone and email information.

Government officials Tuesday sought to defend the program and debunk many of Snowden's claims, including his assertion about wiretapping calls.

“We don’t listen in on anybody’s calls under this program at all,” said Deputy Attorney General James Cole.

Nor does the NSA have the power to tap the content of emails. To get any phone or electronic data would require court approval, officials said, and is used only when there is evidence of a potential tie to terrorism.

FBI Deputy Director Sean Joyce said two specific surveillance programs approved under the Patriot Act — one targeting foreign phone calls and another that makes use of access to all U.S. telephone records – played a key role in stopping the New York attacks.

“In the fall of 2009, NSA ... intercepted an email from a terrorist located in Pakistan,” Joyce said. “That individual was talking with the individual located inside the United States, talking about perfecting a recipe for explosives.”

The trail eventually led to the arrest and conviction of Najibullah Zazi, who later confessed that he planned to stuff backpacks with explosives and bomb the New York City subway system. The NSA was also able to use U.S. phone records to arrest Zazi’s co-conspirator, Adis Medunjanin.

In the second instance, the NSA tracked a known extremist in Yemen who was working with Kalid Uizani, a terrorist in Kansas City, on a plan to bomb the New York Stock Exchange.

Alexander said he would provide a classified information to lawmakers about the other cases, but would not make everything public out of concern that “going into more detail on how we stop some of these cases … will give our adversaries a way to work around those and attack us or our allies. And that would be unacceptable.”

Alexander said the NSA is investigating Snowden’s actions and how NSA oversight “broke down,” adding that it would have been “extremely difficult” for the contractor to tap into the information he claimed to have seen.

Snowden, Alexander said, had access to sites “that talk about how we do our business, not necessarily what we collect.” That information, he said, requires additional clearance.

But Snowden, Alexander said, has irreparably harmed the government’s ability to foil terrorist plots by leaking information about the program.

“I think it was irreversible and significant damage to this nation,” Alexander said. “I believe it will hurt us and our allies.”