Over the weekend, James R. Clapper Jr., the director of national intelligence, said that officials may access the database only if they can meet a legal justification — “reasonable suspicion, based on specific facts, that the particular basis for the query is associated with a foreign terrorist organization.” Queries are audited under the oversight of the national security court.

Timothy Edgar, a former civil liberties official on intelligence matters in the Bush and Obama administrations who worked on building safeguards into the phone log program, said the notion underlying the limits was that people’s privacy is not invaded by having their records collected, but only when a human examines them.

“When you have important reasons why that collection needs to take place on a scale that is much larger than case-by-case or individual obtaining of records,” he said, “then one of the ways you try to deal with the privacy issue is you think carefully about having a set of safeguards that basically say, ‘O.K., yes, this has major privacy implications, but what can we do on the back end to address those?’ ”

Still, privacy advocates say the existence of the database will erode the sense of living in a free society: whenever Americans pick up a phone, they now face the consideration of whether they want the record of that call to go into the government’s files.

Moreover, while use of the database is now limited to terrorism, history has shown that new government powers granted for one purpose often end up applied to others. An expanded search warrant authority justified by the Sept. 11 attacks, for example, was used far more often in routine investigations like suspected drug, fraud and tax offenses.

Executive branch officials and lawmakers who support the program have hinted that some terrorist plots have been foiled by using the database. In private conversations, they have also explained that investigators start with a phone number linked to terrorism, and scrutinize the ring of people who have called that number — and other people who in turn called those — in an effort to identify co-conspirators.