WASHINGTON — President Obama on Friday made a forceful call to narrow the government’s access to millions of Americans’ phone records as part of an overhaul of surveillance activities that have raised concerns about official overreach.

The president said he no longer wants the National Security Agency to maintain a database of such records. But he left the creation of a new system to subordinates and lawmakers, many of whom are divided on the need for reform.

In a speech at the Justice Department, Obama ordered several immediate steps to limit the NSA program that collects domestic phone records, as well as other surveillance practices, which were exposed last year by former intelligence contractor Edward Snowden.

Obama directed that from now on, the government must obtain a court order for each phone number it wants to query in its database of records.

Analysts will only be able to review phone calls that are two steps removed from a number associated with a terrorist organization instead of three. And he ordered a halt to eavesdropping on dozens of foreign leaders and governments who are friends or allies.

The changes mark the first significant constraints imposed by the Obama administration on surveillance programs that expanded dramatically in the decade after the Sept. 11, 2001 attacks. But already critics from diverse camps are warning that his plan may be unworkable.

Obama is retaining the vast majority of intelligence programs and capabilities that came to light over the past six months in a deluge of reports based on leaked documents. Even the most controversial capability – the government’s access to bulk telephone records, known as metadata – may well be preserved, although with tighter controls and records in the hands of an outside entity.

The database holds phone numbers and call lengths and times, but not actual phone call content.

Obama recognized that others have raised alternatives, such as moving custodianship of the records to the phone companies or an independent third party.

He gave subordinates including Attorney General Eric Holder Jr. until March 28 to develop a plan to “transition” the bulk data out of the possession of the government.

In his speech and his plan, Obama straddled competing security and civil liberties imperatives. His proposals are aimed at containing a public backlash triggered by Snowden, but preserving capabilities that U.S. intelligence officials consider critical to preventing an attack.

Reaction to Obama’s call to end the phone records collection was mixed.

Maine Republican Sen. Susan Collins and independent Sen. Angus King, both members of the Senate Intelligence Committee, said surveillance programs are needed. Both said they have supported efforts to balance the need for anti-terrorism intelligence with the protection of privacy rights.

Collins said she is unsure whether a third party should take custody of the bulk records.

“The President’s decision that the metadata collection should continue but that the data should not be held by the government requires considerable scrutiny,” she said in a statement. “Having the telephone companies or other non-governmental entities responsible for holding this information might well make it far less private and secure than it is currently.”

King said the reforms mentioned by the president reflect changes that King has proposed.

“(A) compromise I have put forward … would expand Legislative Branch oversight of the bulk data program by automatically recording every time the government accesses it and then reporting that information back to Congress on a quarterly basis,” King said in a statement.

The chairmen of the House and Senate Intelligence Committees issued a joint statement focusing on Obama’s remarks that “underscored the importance of using telephone metadata to rapidly identify possible terrorist plots.” Sen. Dianne Feinstein, D-Calif., and Rep. Mike Rogers, R-Mich., added that they have reviewed the existing NSA bulk collection program and “found it to be legal and effective,” indicating they would oppose efforts to end it.

But many civil liberties groups said Obama failed to advance real reform by calling for third-party storage of records.

“He gets close to understanding the concerns, but he backs away from the real reform, which is to end the bulk data collection.” said Anthony Romero, executive director of the American Civil Liberties Union.

John McLaughlin, a former CIA deputy director, said Obama “was trying to find a midway here.’” Obama’s dilemma, he said, is responding to dual challenges: the perception that the program might one day be abused, and the reality that al-Qaida and its affiliates are growing stronger.