Image caption Mr Clapper said there were "numerous inaccuracies" in the report on internet servers being tapped

US spy chief James Clapper has strongly defended government surveillance programmes after revelations of phone records being collected and internet servers being tapped.

He said disclosure of a secret court document on phone record collection threatened "irreversible harm".

Revelations of an alleged programme to tap into servers of nine internet firms were "reprehensible", he said.

Internet firms deny giving government agents access to their servers.

The director of US national intelligence said he wanted to reassure Americans that the intelligence community was committed to respecting their civil liberties and privacy.

He issued a strong-worded statement late on Thursday, after the UK's Guardian newspaper said a secret court order had required phone company Verizon to hand over its records to the National Security Agency (NSA) on an "ongoing daily basis".

That report was followed by revelations in both the Washington Post and Guardian that US agencies tapped directly into the servers of nine internet firms to track people in a programme known as Prism.

The reports about Prism will raise fresh questions about how far the US government should encroach on citizens' privacy in the interests of national security.

The NSA confirmed that it had been secretly collecting millions of phone records. But Mr Clapper said the "unauthorized disclosure... threatens potentially long-lasting and irreversible harm to our ability to identify and respond to the many threats facing our nation".

The article omitted "key information" about the use of the records "to prevent terrorist attacks and the numerous safeguards that protect privacy and civil liberties".

He said reports about Prism contained "numerous inaccuracies". While admitting the government collected communications from internet firms, he said the policy only targets "non-US persons".

'Variety of threats'

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.

Analysis 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.

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

Mr Clapper said the communications-collection 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.

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

If the government has a broader voluntary national security program to gather customer data we don't participate in it Microsoft statement

"Information collected under this program is among the most important and valuable foreign intelligence information we collect, and is used to protect our nation from a wide variety of threats," 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 data gathered through Prism has grown to become a major contributor to the president's daily briefing and accounts for almost one in seven intelligence reports, it adds.

The Washington Post named the nine companies participating in the programme as Microsoft, Yahoo, Google, Facebook, PalTalk, AOL, Skype, YouTube and Apple.

I may have been wiretapped In 2006 I was a plaintiff in an American Civil Liberties Union lawsuit against the government over a domestic spying programme. Other plaintiffs include the late Christopher Hitchens, and James Bamford, the author of a book, The Shadow Factory, about the NSA. The lawsuit stated that NSA officials may have eavesdropped on us illegally - and that the warrantless wiretapping programme should come to a halt. In 2007 an appeals court said that we could not prove that our calls had been monitored. As a result it did not have standing. The suit was dismissed. -Tara McKelvey Read more

Microsoft said in a statement to the BBC that it only turned over customer data when given a legally binding order, and only complied with orders for specific accounts.

"If the government has a broader voluntary national security program to gather customer data we don't participate in it," Microsoft said.

Meanwhile, Yahoo, Apple and Facebook said they did not give the government direct access to their servers.

In a statement, Google said: "Google does not have a 'back door' for the government to access private user data."

On Wednesday, it emerged that the NSA was collecting the phone records of tens of millions of Americans, after the Guardian published a secret order for the Verizon phone company to hand over its records.

What the NSA found out The numbers of both people on the phone call

How long the call lasts

The time that the call is placed

A senior congressman, House intelligence committee chairman Mike Rogers, told reporters that collecting Americans' phone records was legal, authorised by Congress and had not been abused by the Obama administration.

He also said it had prevented a "significant" attack on the US "within the past few years", but declined to offer more information.

The order requires Verizon - one of the largest phone companies in the US - to disclose to the NSA the metadata of all calls it processes, both domestic and international, in which at least one party is in the US.

Such metadata 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.

As surveillance practices come under scrutiny in the US, a new system to monitor phone and internet connections in India is being criticised as "chilling" by New York-based group Human Rights Watch (HRW).

The Central Monitoring System (CMS) enables authorities to follow all online activities, phone calls text messages and social media conversations.

The Indian government said in December 2012 the system would "lawfully intercept internet and telephone services". But HRW says the system by-passes service providers in a country that has no privacy law to protect people from arbitrary intrusions.

In the UK on Wednesday, a committee of MPs criticised a decision to allow Chinese firms such as Huawei to become embedded in British network infrastructure without the knowledge and scrutiny of ministers.

Huawei - which denies close ties with the Chinese state - signed a 2005 telecoms deal with BT to supply equipment for a £10bn major network upgrade.