WASHINGTON — Seeking to calm a furor over U.S. surveillance, President Barack Obama on Friday called for ending the government’s control of phone data from hundreds of millions of Americans and immediately ordered intelligence agencies to get a secretive court’s permission before accessing the records.

The president also directed intelligence agencies to stop spying on friendly international leaders and called for extending some privacy protections to foreign citizens whose communications are scooped up by the U.S.

Obama was announcing the changes during a highly anticipated speech at the Justice Department. His announcements capped a months-long White House review following former National Security Agency analyst Edward Snowden’s leaks about secret surveillance programs. If fully implemented, the president’s proposals would lead to significant changes to the NSA’s bulk collection of phone records, which is authorized under Section 215 of the USA Patriot Act.

In a presidential directive that accompanied the announcements, the White House said that intelligence collection is necessary for the United States “to protect its citizens and the citizens of its allies and partners from harm,” but at the same time “the public has legitimate privacy interests in the handling of their personal information.”

Even with Obama’s announcements, key questions about the future of the surveillance apparatus remain unanswered. While Obama wants to strip the NSA of its ability to store the phone records, he offered no recommendation for where the data should be moved. Instead, he gave the intelligence community and the attorney general 60 days to study options, including proposals from a presidential review board that recommended the telephone companies or an unspecified third party.

Privacy advocates say moving the data outside the government’s control could minimize the risk of unauthorized or overly broad searches by the NSA. However, the phone companies have balked at changes that would put them back in control of the records, citing liability concerns if hackers or others were able to gain unauthorized access.

There appeared to be some initial confusion about Congress’ role in authorizing any changes. An administration official said Obama could codify the data transfer through an executive order, while some congressional aides said legislation would be required.

Congress would have to approve another proposal from the president that would establish a panel of outside attorneys who would consult with the secretive Foreign Intelligence Surveillance Court on new legal issues that arise. The White House says the panel would advocate for privacy and civil liberties as the court weighed requests for accessing the phone records.

The moves are more sweeping than many U.S. officials had been anticipating. People close to the White House review process say Obama was still grappling with the key decisions on the phone record collections in the days leading up to Friday’s speech.

The changes are expected to be met with pushback from some in the intelligence community, who have been pressing Obama to keep the surveillance programs largely intact.

Reacting to reports of Obama’s plan, retired Gen. Michael Hayden, a former NSA director, said Friday that “no one will hold it (the phone data) as well.”

Appearing on NBC’s “Today” show, Hayden said there has been “serious, irreversible harm to the ability” of the National Security Agency to collect intelligence.