President Barack Obama trimmed the powers of the secretive US eavesdropping agency Friday by calling for new privacy safeguards, but allowed bulk phone data sweeps to continue as an anti-terror tool.
In a long-awaited speech outlining changes to programs exposed by Edward Snowden, Obama also said he had halted National Security Agency (NSA) spy taps targeting friendly world leaders.
He also proposed new protections for foreigners caught in US data collection programs, which harvest hundreds of millions of pages of data on telephone calls, Internet use and text messages across the globe.
"Given the unique power of the state, it is not enough for leaders to say: trust us, we won't abuse the data we collect," Obama said, in a speech at the US Justice Department.
Obama's proposals seemed to represent a search for a compromise between demands of civil liberties advocates -- who see all bulk data collection as unconstitutional -- and resistance from US intelligence community.
At the heart of the changes is a commitment from the president to end the NSA's hoarding of telephone "metadata" detailing the duration and destination of calls but not their content.
"I believe critics are right to point out that without proper safeguards, this type of program could be used to yield more information about our private lives, and open the door to more intrusive, bulk collection programs," Obama said.
"I believe we need a new approach. I am therefore ordering a transition that will end the Section 215 bulk metadata program as it currently exists, and establish a mechanism that preserves the capabilities we need without the government holding this bulk meta-data."
Obama called on Attorney General Eric Holder and the NSA to come up with alternative ways to hold the data within 60 days.
Possible alternatives include keeping data with telecommunications firms that are currently compelled to turn it over to the NSA or to deposit it with a third party.
Phone companies have however balked at involvement.
Obama also said that from now on, NSA agents would have to require court permission before accessing data on a specific target of interest, for instance in an anti-terror investigation.
The NSA will also now only be permitted to access call data from people at two removes from a terror suspect. Previously it could probe three "hops" beyond a suspect call.
But the president made clear that the retention of phone data could provide a vital tool for US spies to trace links between terror suspects and must continue.
"Being able to quickly review telephone connections to assess whether a network exists is critical to that effort," Obama said.
The president also said that he had already ordered a halt to dozens of phone taps of friendly foreign leaders and heads of state.
"I have made clear to the intelligence community that -- unless there is a compelling national security purpose -- we will not monitor the communications of heads of state and government of our close friends and allies."
The move followed a furor over claims by Snowden, the fugitive US contractor now exiled in Russia, that US spies had eavesdropped on the mobile phone of German Chancellor Angela Merkel and other leaders.
Obama is also taking the unprecedented step of extending personal protections enjoyed by Americans to foreigners caught in Internet data sweeps.
The measures include restrictions on how long data can be held and on how US spies can access the content of Internet surfing, a senior US official said.
Obama's efforts appeared to be an attempt to restore public confidence in secretive US espionage activity and to clip the wings of intelligence agencies, without crushing their power to thwart terror attacks on US soil.
Snowden, a fugitive US contractor now exiled in Russia, has fueled months of revelations by media organizations over data mining and spying on foreign leaders by the NSA in one of the biggest security breaches in US history.
The disclosures have infuriated US allies, embarrassed Obama administration diplomats and shocked privacy campaigners and lawmakers.
The president, who has demanded Snowden return home to face trial, only mentioned the US nemesis in passing.
"The sensational way in which these disclosures have come out has often shed more heat than light, while revealing methods to our adversaries that could impact our operations in ways that we may not fully understand for years to come," Obama said.
While Obama's proposed reforms appear tangible, they are unlikely to satisfy civil liberties campaigners who want an end to all bulk data collection.