The Guardian was the first to report the court order that requires Verizon to turn over records daily to the NSA.

The highly secretive NSA, which is fenced off from the rest of Fort Meade, collects and processes intelligence gathered from phone calls, Internet activity and other electronic communications. The number of employees at its steel-and-glass headquarters, visible from Route 32, is classified.

In a glossy brochure distributed to reporters last month for the groundbreaking of a computing center — an event actually held outside the NSA campus, away from where the center is to be built — the agency listed several "myths" about its operations.

An example: "MYTH: NSA monitors the world's communications systems at all times. REALITY: NSA is not an indiscriminate vacuum, collecting anything and everything. It performs its work with laser focus — and 'foreign' is the operative word."

Lawmakers confirmed the phone surveillance program last week and suggested that it involved more carriers and has continued for years.

James R. Clapper, the director of national intelligence, said the "unauthorized disclosure" of the order "threatens potentially long-lasting and irreversible harm to our ability to identify and respond to the many threats facing our nation."

Then he said he had directed that some details of the program be declassified "in order to provide a more thorough understanding" of what he called "a sensitive intelligence-collection operation."

The program does not allow the government to listen in on phone calls, view their content or learn the identities of individual subscribers, Clapper said. Rather, the target is metadata such as phone numbers dialed and length of calls.

"The collection is broad in scope because more narrow collection would limit our ability to screen for and identify terrorism-related communications," he said. "Acquiring this information allows us to make connections related to terrorist activities over time."

The Washington Post published details of a program called PRISM, through which it said the NSA taps into the central servers of Internet service providers, including Microsoft, Google, Facebook, Skype, YouTube and Apple, to extract "audio and video chats, photographs, emails, documents, and connection logs that enable analysts to track foreign targets."

Obama said the program does not apply to U.S. citizens or people living in the United States. Like the phone program, he said, the Foreign Intelligence Surveillance Court has authorized it and Congress is "fully apprised of it."

The president said there are trade-offs between "the need to keep the American people safe and our concerns about privacy" — and he welcomed the debate.

"It's important to recognize that you can't have 100 percent security and also then have 100 percent privacy and zero inconvenience," Obama said. "We're going to have to make some choices as a society. And what I can say is that in evaluating these programs, they make a difference in our capacity to anticipate and prevent possible terrorist activity. …

"The modest encroachments on the privacy that are involved in getting phone numbers or duration without a name attached and not looking at content ... it was worth us doing."

Wells C. Bennett, a fellow in national security law at the Brookings Institution and managing editor of the influential blog Lawfare, says it is difficult to assess the legality of such activities because while the law is public, the government's interpretation of the law, its application to the court and its arguments are not.

"The issue to my mind doesn't seem to be: Is the government breaking the law?" Bennett said. "It seems more like: What is their exact view, and if it's a continuing thing that just goes on and on, why shouldn't they be public more about it?"

Sen. Ben Cardin said Congress debated the Patriot Act — including the provision under which the court has granted the Verizon order — in public.

"Mass collection's mass collection," said the Maryland Democrat, who voted in favor of the Patriot Act in 2001 as a member of the House. "People didn't focus on it, but it was in the law. I don't think any of us are surprised, even though I wasn't aware of this until I saw it in the paper."

Still, Cardin said, "I think it's a valid question as to why they couldn't let people know that this was being done."

Rep. Donna Edwards, who voted against the most recent reauthorization of the Patriot Act, called for more transparency.