WASHINGTON — Top national security officials on Tuesday promoted two newly declassified examples of what they portrayed as “potential terrorist events” disrupted by government surveillance. The cases were made public as Congress and the Obama administration stepped up a campaign to explain and defend programs unveiled by recent leaks from a former intelligence contractor.

One case involved a group of men in San Diego convicted of sending money to an extremist group in Somalia. The other was presented as a nascent plan to bomb the New York Stock Exchange, although its participants were not charged with any such plot. Both were described by Sean Joyce, deputy director of the Federal Bureau of Investigation, at a rare public oversight hearing by the House Intelligence Committee.

At the same hearing, Gen. Keith B. Alexander, the head of the National Security Agency, said that American surveillance had helped prevent “potential terrorist events over 50 times since 9/11,” including at least 10 “homeland-based threats.” But he said that a vast majority of the others must remain secret.

“In the 12 years since the attacks on Sept. 11, we have lived in relative safety and security as a nation,” General Alexander said. “That security is a direct result of the intelligence community’s quiet efforts to better connect the dots and learn from the mistakes that permitted those attacks to occur on 9/11.”