Fourteen years after the Patriot Act gave sweeping spy powers to the government in its war against terrorism, a consensus is finally emerging in Congress that the government needs to be reined in—at least a bit. The next two weeks could determine whether that consensus will yield a new law.

In a bipartisan vote of 338-88, the House on Wednesday afternoon passed the USA Freedom Act, which seeks to restrain the nation’s surveillance state while extending other key parts of the 2001 Patriot Act that are set to expire at the end of the month. At its core, the House measure ends the NSA’s bulk collection program first exposed two years ago by Edward Snowden, and requires the government to be more transparent about the data it seeks from citizens. The vote comes just a week after a federal appeals court ruled that the Patriot Act’s controversial Section 215 did not authorize the bulk collection program, which allowed the NSA to access domestic telephone metadata. The ruling by the Second Circuit Court of Appeals didn’t end the program, which the Freedom Act would.

The House measure represented a rare and genuine bipartisan compromise, drawing support from the original author of the Patriot Act, conservative Representative James Sensenbrenner of Wisconsin, along with liberal Democrats like John Conyers of Michigan and Jerrold Nadler of New York, staunch civil libertarians. The White House has said that President Obama would sign it. Yet it faces an uncertain fate in the Senate, where Majority Leader Mitch McConnell wants to extend the entire Patriot Act, untouched, for another five years. Democrats have vowed to block that effort and are hoping that the strong House vote and the chance that the surveillance programs could expire altogether on June 1 will force McConnell to accept the reform bill. A short-term extension, giving the Senate more time to debate, is also possible. (The Senate has a recess scheduled after next week.)

The bill’s supporters say it’s the most far-reaching reform to U.S. surveillance programs in nearly 40 years. On the House floor, Conyers said the bill would put an end to “dragnet surveillance” in the United States. “Today, we have a rare opportunity to restore a measure of restraint to surveillance programs that have simply gone too far,” he said. Many privacy advocates, however, think it doesn’t go far enough to protect civil liberties. They’ve criticized provisions that expand surveillance powers by allowing access to data from more modern forms of communication, like video chats. And they say the proposal doesn’t sufficiently limit the search terms the NSA can use in requesting data and that it contains too many loopholes that would allow the government to access data in an emergency without a warrant. “It completely fails to meaningfully curtail mass surveillance and actually codifies some of the worst modern spying practices into law,” said Evan Greer, campaign director of Fight for the Future, an Internet-freedom advocacy group.

Activists also find little comfort in the fact that the bill has drawn support from the intelligence community and tech firms. An earlier version of the proposal passed the House last year but fell two votes of overcoming a filibuster in the Senate. The current bill is worse, Greer said, because it weakens transparency requirements and makes it easier for the government to cite “state secrets” and withhold information from a new “special advocate”created to serve as a watchdog for the FISA court.

What’s interesting is that supporters in both parties readily admit that the government will likely try to stretch the bounds of the new law just as it has with the Patriot Act. The difference, they say, is that the public will know when they’re doing it. “The government may one day again attempt to expand its surveillance powers by clever legal argument, but it will no longer be allowed to do so in secret,” Conyers argued.

There’s also recognition among some privacy advocates that although the Tea Party has helped elect more libertarian-minded conservatives to Congress, the USA Freedom Act is likely the most significant reform possible under majorities still led by old-school Republican national-security hawks, and at a time when fears of a terrorist attack remain ever-present. The ACLU, for example, is taking no formal position on the bill even though it sent lawmakers a list of areas in which it didn’t go far enough. That dynamic was on display this week when GOP House leaders rejected a bid by a group of younger libertarian members to offer amendments that would have further restricted the NSA. "This is a very delicate issue,” Speaker John Boehner explained to reporters. “I know members would like to offer some amendments, but this is not a place for people to bring out the wrecking ball.”

Broad majorities of House Democrats and Republicans decided on Wednesday that the Freedom Act was good enough as is, increasing pressure on the Senate to accept their compromise. Yet just how significant would the new law be? Lawmakers in Congress have a tendency to hail just about any bill that gets a bipartisan vote as a landmark achievement. Staunch privacy advocates dismiss it for paying lip service to reform while leaving intrusive surveillance programs untouched. The truth on this one lies somewhere in the middle, said Benjamin Wittes, a senior fellow at the Brookings Institution and the author of its Lawfare blog. “This is a significant reform and rollback of a FISA program,” he told me. But it pales in the context of the extensive collections of NSA surveillance tools and the many, often unrelated provisions of the Patriot Act. Section 215 is, after all, just one section, and the reforms in this bill beyond ending bulk data collection are modest. “This is one, small program,” Wittes said. “It is not the big enchilada, or even one of the big enchiladas of the NSA programs.”