Media captionBarack Obama: "You can't have 100% security and also then have 100% privacy and zero inconvenience"

President Barack Obama has defended newly revealed US government phone and internet surveillance programmes, saying they are closely overseen by Congress and the courts.

Mr Obama said his administration had struck "the right balance" between security and privacy.

He also stressed US internet communications of US citizens and residents were not targeted.

And he tried to reassure the US "nobody is listening to your phone calls".

Mr Obama was commenting on revelations this week in the Guardian and Washington Post newspapers that the US National Security Agency (NSA) was collecting or tapping into vast amounts of telephone and internet communications data.

Facebook denial

The news accounts - subsequently confirmed by officials - roiled Washington DC, with privacy advocates criticising the surveillance as an unlawful intrusion and many in Congress defending the programmes as appropriate counter-terrorism tools.

Analysis

By Paul AdamsWashington, United States

President Obama said he experienced some "healthy scepticism" about some of the national security operations he inherited when he took office. He's hardly the first American president to realise that it's easier to stick to your core principles outside the White House than inside.

But after managing to keep words like Prism out of the public eye for one and a bit terms, he's having to grapple with how to explain some scary-sounding stuff to the American public.

He still believes that he's successfully navigated between the requirements of security and the need to uphold the Constitution, even if he admits that there are "trade-offs." Those trade-offs have been the subject of rumour and speculation for years but are now glaringly apparent. Mr Obama says he welcomes the debate.

On Wednesday night, the UK's Guardian newspaper reported a secret court had ordered phone company Verizon to hand over to the NSA millions of records on telephone call "metadata".

That report was followed by revelations in both the Washington Post and Guardian that the NSA tapped directly into the servers of nine internet firms including Facebook, Google, Microsoft and Yahoo to track online communication in a programme known as Prism.

Mark Zuckerberg, founder of Facebook, said the press reports were "outrageous" and denied Facebook's participation in the programme.

His statement echoed those of other internet companies, who said they had not given the government direct access to their servers.

Mr Zuckerberg said: "We have never received a blanket request or court order from any government agency asking for information or metadata in bulk, like the one Verizon reportedly received.

"And if we did, we would fight it aggressively. We hadn't even heard of Prism before yesterday."

And on Friday, the Guardian reported that the UK's electronic surveillance agency, GCHQ, had been able to see user communications data from the American internet companies, because it had access to Prism.

The Guardian reported that GCHQ had access to the system since June 2010 and information from Prism had contributed to 197 British intelligence reports last year.

In California on Friday, Mr Obama noted both NSA programmes had been authorised repeatedly by Congress and were subject to continual oversight by congressional intelligence committees and by secret intelligence courts.

The president said he had come into office with a "healthy scepticism" of both programmes, but after evaluating them and establishing further safeguards, he decided "it was worth it".

"You can't have 100% security, and also then have 100% privacy and zero inconvenience," Mr Obama said.

Acknowledging "some trade-offs involved", he said, "We're going to have to make some choices."

Analysis

By Rory Cellan-JonesTechnology correspondent

What this highlights is the way we now entrust our data and our privacy almost entirely to American companies, storing it in their "clouds" - vast data centres located in the US.

Senior US Senator Dianne Feinstein confirmed on Thursday that the Verizon phone records order published by the Guardian was a three-month extension of an ongoing request to Verizon. Intelligence analysts say there are likely similar orders for other major communications firms.

The data requested includes telephone numbers, calling card numbers, the serial numbers of phones used and the time and duration of calls. It does not include the content of a call or the callers' addresses or financial information.

'Assault on Constitution'

Prism was reportedly developed in 2007 out of a programme of domestic surveillance without warrants that was set up by President George W Bush after the 9/11 attacks.

WHAT THE PAPERS SAY

The Washington Post says one of the many things still unclear about the phone surveillance programme is why Americans didn't know about it. In an editorial, the paper says the public needs more explanation to be able to make a reasonable assessment of whether such programmes are worth the security benefits.

The San Francisco Chronicle says the collection of phone records "conducted with only the barest legal oversight" is "another policy disappointment from a president who came to office promising to ease the worst of the panicky, ill-considered policies launched after the Sept. 11 attacks 13 years ago".

Prism reportedly does not collect user data, but is able to pull out material that matches a set of search terms.

James Clapper, director of US national intelligence, said in a statement on Thursday the internet communications surveillance programme was "designed to facilitate the acquisition of foreign intelligence information concerning non-US persons located outside the United States".

"It cannot be used to intentionally target any US citizen, any other US person, or anyone located within the United States," he added.

But while US citizens were not intended to be the targets of surveillance, the Washington Post says large quantities of content from Americans are nevertheless screened in order to track or learn more about the target.

The Prism programme has become a major contributor to the president's daily intelligence briefing and accounts for almost one in seven intelligence reports, it adds.

Mr Clapper said the programme, under Section 702 of the Foreign Intelligence Surveillance Act, was recently reauthorised by Congress after hearings and debate.