Correction: An earlier version of this story incorrectly identified Oregon Sen. Ron Wyden as a Republican. He is a Democrat. This version has been corrected.

Speaking to members of the press Friday, President Obama sought to assure Americans that the government collects telephone call durations and numbers but not content. (The Washington Post)

For four years, President Obama’s approach to counterterrorism has been defined by his embrace of paramilitary power — the drones and the commando teams whose ruthless pursuit of al-Qaeda helped cripple the terrorist network through a global targeted killing campaign.

Months into his second term, however, Obama faces a rash of disclosures that have revealed the extent to which his administration also has relied on a less conspicuous capability — a massive electronic surveillance net cast within the United States that appears to have gathered data on almost anyone with a computer or phone.

The dimensions of the programs are only beginning to emerge. But leaks of a secret surveillance court order and highly classified government slides indicate that the FBI and National Security Agency have assembled detailed call records on millions of Americans and tapped into the servers of technology companies that handle the bulk of the nation’s e-mail and online video traffic.

Until now, the effort has been shielded from the sort of public scrutiny that gradually accumulated around Obama’s drone campaign, mainly because the surveillance programs leave virtually no trace and are so highly classified that even critics in Congress have been unable to fully articulate their concerns.

This past week’s disclosures punctured that veil, adding new pressure on Obama to defend his administration’s counterterrorism policies and the secrecy surrounding them. It is a position that in some ways resembles the second-term posture of his predecessor, George W. Bush.

In his first public comments on the controversy, Obama emphasized the congressional and judicial oversight of the surveillance programs. He also stressed their effectiveness.

“I came in with a healthy skepticism about these programs,” Obama said Friday. But he said the value in disrupting terrorism outweighed any “modest encroachments on privacy. . . . You know, net, it was worth us doing.”

Beyond the familiar ring of that rationale, U.S. officials, civil liberties groups and security experts said the revelations show that, as much as Obama has sought to distance himself from the counterterrorism policies of his predecessor, he has embraced and in some cases expanded controversial programs that originated under Bush.

“If you think about the president’s speeches, there has been an attempt to articulate a discontinuity” from Bush on a range of issues, including prisoner interrogations and the Guantanamo Bay detention camp, said Steven Aftergood, an expert on secrecy and surveillance at the Federation of American Scientists.

“But when it comes to surveillance,” Aftergood said, “there’s no clear repudiation. On the contrary, there appeared to be an embrace and an endorsement all the way through.”

Bush loyalists made similar points in ways that at times bordered on gloating.

“Drone strikes. Wiretaps. Gitmo. O is carrying out Bush’s 4th term,” former Bush administration spokesman Ari Fleischer said in a message on Twitter, referring to Obama.

The comments were triggered by a pair of disclosures about the operations of the NSA, the highly secretive agency responsible for eavesdropping on electronic communications around the globe.

The NSA is barred from spying on Americans. But a classified court order published by the Guardian newspaper showed that the NSA had been given authority by a special court to collect calling data on millions of Americans from a subsidiary of the Verizon telecommunications company.

U.S. officials said similar orders are in force against other carriers, meaning that the NSA probably has a database containing details including location and duration of cellphone calls dating back years.

The Washington Post then disclosed classified documents describing a separate program code-named PRISM that indicated the NSA has established access to the servers of companies including Microsoft, Google and Apple. The access would enable the U.S. government to extract audio, video, e-mails and other content, though Obama said no e-mails of U.S. citizens or residents are examined.

U.S. officials have said that the data obtained by the NSA do not include names of individuals and that the agency is not allowed to see the contents of communications involving Americans without evidence of a connection to terrorism and a warrant from the Foreign Intelligence Surveillance Court, which oversees requests for surveillance of suspected foreign agents inside the United States.

Still, the scope of the programs stunned experts and appeared to contradict recent statements by administration officials.

In a March hearing on Capitol Hill, Sen. Ron Wyden (D-Ore.), who has in recent years raised concerns about the domestic activities of the NSA, asked Director of National Intelligence James R. Clapper Jr. point-blank, “Does the NSA collect any type of data at all on millions or hundreds of millions of Americans?”

“No, sir,” Clapper responded before adding, “Not wittingly.”

A spokesman for Clapper did not respond to a request for comment Friday.

Statistics released by the Justice Department indicate that some surveillance operations authorized by the court have expanded under Obama and that others have remained at levels established under Bush. Requests for warrants under the provision used to compel Verizon to turn over data have surged, from 13 in 2008 to 212 last year.

Meanwhile, Obama has fought legal attempts to force the government to disclose Justice Department opinions that provide the legal basis for NSA surveillance programs. In 2011, the administration released two heavily redacted memos that had been in effect under Bush, but it has yet to produce any of its own.

Since 2008, “the administration has changed, Congress has changed, leadership of intelligence agencies has changed,” said Jameel Jaffer, deputy legal director of the American Civil Liberties Union, which has been involved in the effort to obtain the memos. But surveillance, Jaffer said, “grows steadily bigger and less accountable every year.”

The NSA disclosures added to the list of surveillance and counterterrorism controversies that have erupted in the early months of Obama’s second term. Obama recently sought to tamp down criticism of the tactics and secrecy associated with the drone campaign by releasing information on Americans who had been killed and imposing tighter limits on strikes.

The White House also renewed its support for legal protections for journalists after it was revealed that the FBI had surreptitiously gathered calling records and other sensitive data on reporters for the Associated Press and Fox News.

On Friday, Obama delivered a measured defense of electronic surveillance programs, but he also expressed frustration with what he called “hype” surrounding the NSA’s operations.

“I think it’s interesting that there are some folks on the left, but also some folks on the right who are now worried about it who weren’t worried about it when it was a Republican president,” Obama said.