Legislation in the House aimed at ending the National Security Agency’s mass collection of Americans’ records has been revised to win Obama administration approval, leading privacy advocates on Tuesday to withdraw their support.

The USA Freedom Act has been significantly watered down and undermines a recent deal between the intelligence and judiciary committees, civil liberties advocates charge.

“This legislation was designed to prohibit bulk collection, but has been made so weak that it fails to adequately protect against mass, untargeted collection of Americans’ private information,” said Center for Democracy and Technology President Nuala O’Connor. “The bill now offers only mild reform and goes against the overwhelming support for definitively ending bulk collection.”

But U.S. officials say the revised bill, which is scheduled for a floor vote on Thursday, still honors the deal crafted by lawmakers two weeks ago to protect privacy and the intelligence community’s ability to detect terrorist attacks. They say it ends the NSA’s holding of hundreds of billions of phone records. The White House is expected to publicly endorse the revision this week.

“The amended bill successfully addresses the concerns that were raised about NSA surveillance, ends bulk collections and increases transparency,” said a House GOP aide, who was not authorized to speak for the record. “We view it as a victory for privacy, and while we would like to have had a stronger bill, we shouldn’t let the perfect be the enemy of the good.”

USA Freedom was conceived last year in the wake of disclosures of widespread NSA surveillance. It promised not just to end the NSA’s mass collection of Americans’ phone call detail records but ban other forms of domestic bulk collection.

It would bar the NSA from amassing a database of all Americans’ phone records, instead allowing the agency to request records from the phone companies if the records related to an agent of a foreign power.

But changes worked out among the committees, the administration and House leadership over the past two weeks have alarmed privacy advocates.

In particular, by changing the language governing how agencies may collect information under national security authorities, the government has introduced ambiguity into the bill that leaves open the door to large-scale collection, they say.

“Put another way, it may ban ‘bulk’ collection of all records of a particular kind, but still allow for ‘bulky’ collection impacting the privacy of millions of people,” said Robyn Greene, policy counsel for the New America Foundation’s Open Technology Institute.

CDT Senior Counsel Harley Geiger said: “The limit on government authority in this bill needs to be as clear as possible because the government has a track record of exploiting ambiguities to expand surveillance activities.”

U.S. officials familiar with the negotiations expressed surprise at the advocates’ reaction. “I can’t imagine what scenario they’re thinking about,” said one official, who was not authorized to speak for the record. “There’s definitely no desire anywhere in any part of the government to keep some door open to large scale collection.”

Still, civil liberties groups say that before the bill becomes law, they want Congress to make clear that mass collection of records belonging to Americans not suspected of any crime is not allowed.

“We particularly call on the sponsors of the bill to make clear in their statements on the House floor that the government is not allowed to ... [grab] records of all phone calls in a particular area code, all Internet accounts in a particular Zip code, all emails sent through a particular email service or all transactions made through a particular bank,” Greene said.

The House is expected to pass the bill, sending it to the Senate. Sen. Patrick Leahy (D-Vt.), Judiciary chairman and cosponsor of the original bill, said Tuesday that he was “glad the House is poised to act’’ on the bill. “However,” he said, “I remain concerned that some important reforms were removed.”

Other U.S. officials said the administration is eager to see the legislation adopted so it can move on. They predicted that the bill would wind up on President Obama’s desk before July 4. “This seems,” said one, “to be a done deal.”