Sean Joyce, deputy director of the Federal Bureau of Investigation, testifies before the House Select Intelligence Committee on Tuesday.

The deputy director of the FBI claimed Tuesday that a controversial electronic surveillance program revealed in media reports earlier this month helped thwart a plot to blow up the New York Stock Exchange.

Testifying before the House Intelligence Committee, FBI deputy director Sean Joyce argued that the PRISM program, which is designed to intercept electronic communications of foreigners for intelligence purposes, has been key to stopping a number of alleged terrorist attacks over the past decade.

One such plot, Joyce said, targeted the New York Stock Exchange(NYX) and involved Khalid Ouazzani, an American citizen born in Morocco who pleaded guilty in 2010 to sending money to al Qaeda.

Using PRISM, the National Security Agency "was monitoring a known extremist in Yemen," Joyce said. "This individual was in contact with an individual in the United States named Khalid Ouazzani."

Along with other unnamed individuals, Ouazzani was involved in "nascent plotting to bomb the NYSE," Joyce said.

"Ouazzani had been providing information and support to this plot," Joyce said. "The FBI disrupted and arrested these individuals."

The New York Stock Exchange declined to comment.

Ouazzani is currently incarcerated and awaiting sentencing. He pleaded guilty to bank fraud, money laundering and providing material support to al Qaeda, but his plea agreement makes no mention of the alleged stock-exchange plot.

"Khalid Ouazzani had nothing to do with any plot to blow up the New York Stock Exchange," his lawyer, Robin Fowler, told CNNMoney Tuesday.

How to hide from the NSA

Ouazzani had been living in Kansas City prior to his arrest. He admitted to providing more than $23,000 to al Qaeda, using proceeds from his sale of an auto parts business and an apartment sale in the United Arab Emirates.

Don Ledford, a spokesman for the U.S. attorney's office in Kansas City, said Ouazzani had served as a cooperating witness in a case involving two New York men -- Wesam El-Hanafi and Sabirhan Hasanoff -- who pleaded guilty last year to providing material support to al Qaeda. The two were taken into custody following their arrests in the United Arab Emirates in 2010.

The government's sentencing memo for Hasanoff, filed in federal court last month, says he traveled to the stock exchange in 2008, "unquestionably with the purpose of gathering information for a future terrorist attack."

Hasanoff allegedly produced a one-page report on this expedition at the behest of an al Qaeda contact in Yemen, though prosecutors acknowledged that this report was "rudimentary and of limited use ... to plan a terrorist operation."

David Ruhnke, a lawyer for Hasanoff, described the alleged stock-exchange plot as "a non-event that lay dormant for two years after it took place and was resurrected today for [the] first time as if it was a serious threat."

"What was stated under oath before Congress earlier today was, even by DC standards, a gross distortion of the truth," Ruhnke said in an email.

Under questioning in Tuesday's congressional hearing, Joyce said the plot to bomb the stock exchange was in "the very initial stages" when the FBI began electronic surveillance of Ouazzani and the other men.

"We were able to lure some individuals to the United States, and we were able to effect their arrest, and they were convicted for this terrorist activity," Joyce said.

General Keith Alexander, director of the National Security Agency, said Tuesday that information gathered through surveillance of electronic communications and telephone metadata has helped prevent over 50 terrorist plots since the attacks of September 11, 2001. Alexander made a similar assertion in testimony before Congress last week.

These claims have been met with skepticism in some quarters. In a joint statement last week, Senators Mark Udall and Ron Wyden said they "have not yet seen any evidence showing that the NSA's dragnet collection of Americans' phone records has produced any uniquely valuable intelligence."

"We look forward to reviewing the analysis that the general has promised to provide showing how the intelligence community arrived at these numbers," the senators said.