The House Judiciary Committee unanimously approved the first major effort at surveillance reform since the controversy surrounding leaks from former National Security Agency contractor Edward Snowden began. The vote is a victory for civil liberties advocates but a much narrower one than they were hoping for.

“While this bill is not perfect, it’s the strongest attempt to end bulk collection that’s out there,” said Gabriel Rottman of the American Civil Liberties Union.

The bill that passed the House panel Wednesday is a revised version of the USA Freedom Act, a collaboration between Wisconsin Republican Rep. Jim Sensenbrenner and Vermont Democratic Senator Patrick Leahy that was introduced in October. That measure never made it to a vote. Instead, legislators on the committee hammered a compromise, leaving much of the original sweeping bill on the cutting room floor. Crucially, the new version drew the support of House Judiciary Chairman Bob Goodlatte, who last July had voted against an effort to rein in the NSA’s powers that narrowly failed.

Still, the bill signals the best hope for major policy changes to the government’s surveillance powers since Snowden leaked details about the NSA’s telephone metadata collection program. The program, which collects in bulk the time, duration, and parties involved in Americans’ phone calls, has been criticized by two government panels and even a federal judge as inessential to preventing terror attacks. The administration has defended the program as authorized under section 215 of the Patriot Act. Sensenbrenner, one of the authors of the Patriot Act, has maintained that Section 215 was never meant to authorize bulk collection.

New York Democratic Rep. Jerrold Nadler, one of the authors of the compromise, said in his opening statement that the bill was “the first real chance in more than a decade to place legislative limits on sweeping, unwarranted – and at times unlawful – government surveillance.”

The original version would have banned all bulk collection by the government, the new version still allows the government to request records up to two degrees away from the target of an inquiry as long as they get the approval of a judge on the secret Foreign Intelligence Surveillance Court. The earlier version would also have barred the NSA from gaining access to the content of Americans’ communications if collected while the agency is targeting sources believed to be abroad, dubbed “backdoor searches” by critics. The ACLU sent a letter to the judiciary committee leadership Wednesday that laid out ongoing concerns with the new version of the bill, including worries about how long the government is allowed to keep data after it obtains it.

A series of amendments put forward by California Democrat Zoe Lofgren during the markup illustrated just how far the bill had moved from the original version. Lofgren proposed an amendment that would have barred “backdoor searches” that was easily voted down, with legislators indicating that any changes would alter the delicate compromise that had been reached. Sensenbrenner, referring to Lofgren’s proposal to ban backdoor searches, said the bill was on “the fast track,” and Lofgren’s amendment would “blow up” the bill’s chances of passage.

Lofgren also proposed an amendment that would have raised the standard for requesting records from the “reasonable articulable suspicion” to probable cause, the same standard required for obtaining a warrant. Under current law, records in possession of a third party, like a telecommunications company, are not subject to the same level of privacy as physical items in your home. Civil libertarians feel that distinction is growing increasingly outdated as Americans store more and more of their personal information online.

That amendment was not only voted down – Lofgren’s colleagues began to lecture her on legal precedent regarding the reduced standard for third-party records. Ironically, that argument figured heavily in the Obama administration’s defense of the very metadata collection program the new legislation is designed to end.

New York Democratic Rep. Jerrold Nadler, one of the authors of the compromise, agreed with Lofgren that more protections for third-party records was needed but that her proposal was “not right” for the moment because of the need to preserve the agreement on the new legislation.

The committee did restore language proposed by Washington Democratic Rep. Suzan DelBene, which made it easier for private companies to disclose details about government requests for data.

Senator Leahy, who chairs the Senate judiciary committee, said in a statement following the vote that he would seek to restore some of the provisions in the original proposal he authored with Sensenbrenner. Leahy also said the committee had taken an “historic step” by approving the bill.

As it stands, the new, less sweeping version of the USA Freedom Act is now much closer to a rival proposal put together by the House intelligence committee, and to changes President Obama said he supported in January. The intelligence committee proposal would allow intelligence agencies to collect the data from companies first, and then justify their decision to the secret court later if the company objects.

With the judiciary committee having passed its version, the focus is now on the intelligence committee measure. Despite harsh Republican criticism of the Obama administration over the Snowden revelations – the Republican National Committee adopted an anti-NSA resolution in January – the House GOP leadership has been cautious. Yet the compromise legislation adopted by the House Judiciary Committee may be one all parties, including the administration, can live with.

“There’s a strong sense that we need to end bulk collection,” a Democratic House aide said. “This will have overwhelming support when it comes to the floor.”