WASHINGTON - President Barack Obama is urging Americans to "make some choices" in balancing privacy and security as he defends once-secret surveillance programs that sweep up an estimated 3 billion phone calls a day and amass Internet data from U.S. providers in an attempt to thwart terror attacks.

Obama says it will be harder to detect threats against the U.S. now that the two top-secret tools to target terrorists have been so thoroughly publicized.

At turns defensive and defiant while speaking to reporters on Friday, Obama stood by the spy programs revealed this week.

The National Security Agency has been collecting the phone records of hundreds of millions of Americans each day, creating a database through which it can learn whether terror suspects have been in contact with people in the U.S. It also was disclosed this week that the NSA has been gathering all Internet usage — audio, video, photographs, emails and searches — from nine major U.S. Internet providers, including Microsoft and Google, in hopes of detecting suspicious behavior that begins overseas.

"Nobody is listening to your telephone calls," Obama assured the nation after two days of reports that many found unsettling. What the government is doing, he said, is digesting phone numbers and the durations of calls, seeking links that might "identify potential leads with respect to folks who might engage in terrorism."

If there's a hit, he said, "if the intelligence community then actually wants to listen to a phone call, they've got to go back to a federal judge, just like they would in a criminal investigation."

While Obama said the aim of the programs is to make America safe, he offered no specifics about how the surveillance programs have done that. House Intelligence Committee Chairman Rep. Mike Rogers, R-Mich., on Thursday said the phone records sweeps had thwarted a domestic terror attack, but he also didn't offer specifics.

Obama asserted his administration had tightened the phone records collection program since it started in the George W. Bush administration and is auditing the programs to ensure that measures to protect Americans' privacy are heeded — part of what he called efforts to resist a mindset of "you know, `Trust me, we're doing the right thing. We know who the bad guys are.'"

But again, he provided no details on how the program was tightened or what the audit was examining.

The revelations have divided Congress and led civil liberties advocates and some constitutional scholars to accuse Obama of crossing a line in the name of rooting out terror threats.

Obama, himself a constitutional lawyer, strove to calm Americans' fears but also to remind them that Congress and the courts had signed off on the surveillance.

"I think the American people understand that there are some trade-offs involved," Obama said when questioned by reporters at a health care event in San Jose, Calif.

"It's important to recognize that you can't have 100 percent security and also then have 100 percent privacy and zero inconvenience," he 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."

Obama said U.S. intelligence officials are looking at phone numbers and lengths of calls — not at people's names — and not listening in.

The two classified surveillance programs were revealed in newspaper reports that showed, for the first time, how deeply the NSA dives into telephone and Internet data to look for security threats. The new details were first reported by The Guardian newspaper of Britain and The Washington Post, and prompted Director of National Intelligence James Clapper to take the unusual and reluctant step of acknowledging the programs' existence.

Obama echoed intelligence experts — both inside and outside the government — who predicted that potential attackers will find other, secretive ways to communicate now that they know that their phone and Internet records may be targeted.

"The bad folks' antennas go back up and they become more cautious for a period of time," said former Rep. Pete Hoekstra, a Republican member of the House Intelligence Committee for a decade. He said he approved the phone surveillance program but did not know about the online spying.

"But we'll just keep coming up with more sophisticated ways to dig into these data. It becomes a techies game, and we will try to come up with new tools to cut through the clutter," he said.

In the immediate years after the Sept. 11, 2001, attacks, the government began collecting data from U.S. telephone companies, looking at whether overseas terror suspects were calling phone numbers in the U.S. The program does not allow the government to listen in on calls, but it can track where a call was placed and how long it lasted. If intelligence officials single out phone numbers that they want to target for eavesdropping, they must return to court to get approval.

In 2006, after the telephone surveillance was first revealed and amid a public outcry, a secret court was tasked with approving all of the government requests for the records. But until this week, it was not widely known how many phone records were noted, or how often.

The NSA seizure of website and Internet provider records was even more secretive, and began only in the past few years. Clapper said those records, too, are released only with secret court orders and monitors look only for documents that appear to have come from overseas. The data are not to be used to target U.S. citizens, and the government must try to minimize any information that was mistakenly taken from Americans.

___

Follow Lara Jakes Twitter at: https://twitter.com/larajakesAP.