Obama insisted on Friday that the NSA operations had full congressional oversight. Photograph: Stephen Lam/Getty Images

Barack Obama struck a defiant stance amid revelations about the extent of surveillance operations by the US federal government, arguing the programmes had full congressional approval and criticising "leaks" and "hype" in the media.

As the issue threatened to overshadow the president's summit with the Chinese premier Xi Jinping in California, Obama insisted on Friday that the operations had full congressional oversight and struck an appropriate balance between privacy and national security.

"If people don't trust Congress and the judiciary then I think we are going to have some problems here," the president said, in his first remarks since the revelations began this week.

Obama was speaking on his way to the summit with Xi, where he had been expected to raise the issue of Chinese cyber-hacking. Instead, he was forced to deal with a growing row over the extent of the surveillance state in the US.

The director of national intelligence, James Clapper, confirmed revelations by the Guardian and the Washington Post that the National Security Agency uses companies such as Google, Facebook and Apple to obtain information that includes the content of emails and online files.

Coupled with the acknowledgement that authorities had undertaken a seven-year programme to monitor the telephone calls of potentially millions of people in the US, it became clear that the Obama administration has embraced and expanded the surveillance regime begun under President Bush.

The Department of Justice declined to say whether it had launched a formal leak inquiry following the revelations. "I have no comment," said Andrew Ames, a spokesman for the department.

Obama claimed that the disclosures had been damaging and said oversight should be left to Congress and the US courts. "I don't welcome leaks, because there's a reason why these programmes are classified," he said. "If every attempt to stop a terrorist act is on the front page of the newspaper or on television ... then the people who are trying to do us harm are going to take preventative measures."

Nonetheless, he said it was good to have a public debate about balancing security with civil liberties, without explaining how that was possible in the case of classified activities. "I think it's healthy for this democracy," said Obama. "I think it's a sign of maturity."

Obama's claims that the programs struck an appropriate balance were rejected by Democratic senators Mark Udell and Ron Wyden, who for at least two years have warned about secret government interpretations of the Patriot Act, introduced in the wake of 9/11.

They said in a joint statement: "We disagree with the statement that the broad Patriot Act collection strikes the 'right balance' between protecting American security and protecting Americans' privacy. In our view it does not.

"When Americans call their friends and family, whom they call, when they call, and where they call from is private information. We believe the large-scale collection of this information by the government has a very significant impact on Americans' privacy, whether senior government officials recognise that fact or not."

Another Democratic senator, Joe Manchin of West Virginia, called on the attorney general, Eric Holder, to consider resigning. In an interview with Bloomberg TV, he said: "Whenever you feel that you have lost your effectiveness or may be losing your effectiveness to the detriment of the job that you do, you have to evaluate that and make a decision. And I think we're at the time now where decisions have to be made."

US officials admitted using a secret system to mine the systems of the biggest technology companies to spy on millions of people's online activity. Clapper insisted that the internet surveillance programme, known as Prism and disclosed by the Guardian and the Washington Post on Thursday, only covered communications with foreigners and did not target US citizens. "Information collected under this programme is among the most important and valuable intelligence information we collect, and is used to protect our nation from a wide variety of threats," Clapper said.

A secret 41-slide PowerPoint presentation obtained by the Guardian says that the information can be collected "directly from the servers" through the Prism system. The technology companies denied that direct access to servers was possible in this way, but they admitted complying with legal orders to turn over information.

Clapper attacked the disclosure as "reprehensible" for risking "important protections for the security of Americans".

Experts on US relations in Beijing said the revelations were bound to "weaken the US government's moral position" although they drew distinctions between the two approaches and expected the issue would still be raised. "Obviously the news breaking on the eve of the Sunnylands summit puts Obama in a much weaker position," added Linda Jakobson, east Asia programme director at the Lowy Institute.

To push back against the growing scandal, Clapper also declassified aspects of a highly secretive acquisition of all Verizon's phone records first disclosed by the Guardian on Wednesday. Clapper argued that the programmeme operates "within the constraints of law" and "appropriately protect[s] privacy and civil liberties".

"The collection is broad in scope because more narrow collection would limit our ability to screen for and identify terrorism-related communications," Clapper said. Yet he defended the broad, ongoing intelligence collection effort by saying that "only a small fraction" of the phone records – such as phone numbers and call – are ever scrutinised by intelligence analysts for connections to terrorism. Such scrutiny occurs according to "strict restrictions" overseen by the Justice Department and the special, secretive US surveillance court, he said.

Clapper reiterated that the content of phone calls is off-limits under the National Security Agency "metadata" collection programme – while avoiding reference to the Prism system that sweeps up such content from nine participating internet companies. Clapper also repeatedly pointed out that some, but not all, members of Congress "have been fully and repeatedly briefed" on the programme.

The secret document obtained by the Guardian shows that the Prism system facilitates extensive, in-depth surveillance on live communications and stored information.

The NSA access was enabled by changes to US surveillance law introduced under President Bush and renewed under Obama in December 2012. The law allows for the targeting of any customers of participating firms who live outside the US, or those Americans whose communications include people outside the US.

Technology companies appeared not to be aware of how the NSA characterises the system. Apple said it had "never heard" of Prism. An Apple spokesman said: "We do not provide any government agency with direct access to our servers and any agency requesting customer data must get a court order."

Mark Zuckerberg, the founder and CEO of Facebook, described the press reports about Prism as "outrageous". He insisted that the Facebook was not part of any programme to give the US government direct access to its servers. "We hadn't even heard of Prism before yesterday," he said.

Larry Page, CEO of Google, said: "Press reports that suggest that Google is providing open-ended access to our users' data are false, period." He went on: "Any suggestion that Google is disclosing information about our users' Internet activity on such a scale is completely false." Both called on the US government to be more transparent about its activities.

Legislators, particularly those serving on committees that oversee US intelligence, confirmed the existence of the spy efforts, saying they have been in effect for at least six years – and jumped to their defence.

"These activities have led to the successful detection and disruption of at least one terrorist plot on American soil, possibly saving American lives," said the leadership of the House intelligence panel, Representatives Mike Rogers, a Republican, and Dutch Ruppersberger, a Democrat, in a joint statement.