The Senate passed a “clean” version of the USA Freedom Act Tuesday afternoon in a stunning rebuke of the chamber’s Majority Leader, Sen. Mitch McConnell (R-Ky.)

The surveillance reform bill already passed the House last month and now awaits President Obama’s signature. Once codified, surveillance authorities under the USA Patriot Act will be reauthorized through 2019. Telephone companies will also begin taking over the NSA’s phone dragnet program—a process that must be completed within six months, as required by the legislation.

Ahead of the 67-32 final vote approving of the surveillance reform legislation Tuesday, Senators defeated a series of amendments introduced by McConnell.

The provisions would have extended the length of time the government can continue its bulk collection of phone records to one year, and possibly longer depending on a certification process by the Director of National Intelligence.

Another measure put forward by McConnell that was defeated on the floor would have required telephone companies to notify the government about any changes to its data retention policies; another would have undercut reforms to the top-secret Foreign Intelligence Surveillance Court—a body that signs off on many of the NSA’s spying methods and targets.

After watching his amendments fail, McConnell declared that the Senate is taking “a step in the wrong direction.”

Passage of the overall bill comes after a lengthy failed gambit by the Majority Leader to strengthen the US spooks’ hands. First, he tried to kill the USA Freedom Act, and then tried to weaken the legislation. The fruits of that strategy, or lack thereof, meant that lawmakers weren’t able to approve of the bill before the June 1 expiration date of Section 215 of the Patriot Act.

Last month, roughly a week before the expiration of Section 215, McConnell whipped members of his caucus to vote down the reform legislation. He then attempted to use the bungled process he oversaw to force through a last minute “clean” reauthorization of the Patriot Act spying authorities.

That reauthorization was voted down, however, and subsequent attempts by McConnell to pass short-term extensions were blocked by Sen. Rand Paul (R-Ky.) and other lawmakers.

Although the body reached the 60-vote threshold needed to limit debate on the USA Freedom Act on Sunday, as the June 1 deadline approached quickly, bickering between Paul and McConnell over the amendment process saw the authorities expire.

The Senate’s passage of the USA Freedom Act marks the first time that the government’s massive post-9/11 intelligence apparatus has been reined in by lawmakers—a credit to former NSA contractor-turned-whistleblower Edward Snowden, whose disclosures sparked the surveillance debate in Washington.

“It’s a historic moment,” Sen. Patrick Leahy, a co-sponsor of the legislation, said on the Senate floor after the bill passed. “It’s the first major overhaul of government surveillance law in decades.”

Amie Stepanovich, US Policy Manager at Access, a digital privacy group based in Washington, DC also applauded passage of what she described as a “first step toward comprehensive surveillance reform,” adding that the bill “sends a message: unlawful, unaccountable, unacceptable surveillance must end now.”

To many lawmakers, however, the bill didn’t go far enough in curtailing surveillance abuses. Assuming that President Obama signs the USA Freedom Act into law as it is, it won’t address foreign dragnets that often scoop up communications belonging to Americans, nor does the legislation attempt to constrain spying under the little-known Executive Order 12333.

Stepanovich acknowledged the shortcomings of the bill, but urged Congress to go farther in the future.

“Now that the Congress has passed a prohibition against bulk collection, it should be expanded to other authorities, including Section 702 of the FISA Amendments Act,” she said.