The head of the National Security Agency is telling Congress that the government's sweeping surveillance programs have foiled some 50 terrorist plots around the world.

 Army Gen. Keith Alexander tells the House Intelligence Committee that the two programs that were recently disclosed are critical in the terrorism fight. One program gathers U.S. phone records, and the other is designed to track the use of Internet servers in the United States by foreigners with possible links to terrorism.

In a rare, open Capitol Hill hearing, Alexander told lawmakers that the programs help the intelligence community ``connect the dots.''

Leaders of the panel from both parties joined him in defending the surveillance. And they said the actions of Edward Snowden in disclosing information about the programs were criminal.

Republican Mike Rogers of Michigan said, ``It is at times like these where our enemies within become almost as damaging as our enemies on the outside.''