The Senate voted 67 to 32 Tuesday to pass the USA Freedom Act, which limits NSA bulk data collection.
That came after amendments were voted down that would have forced a re-vote in the House, which passed it overwhelmingly.
The bill can now go to the President, who has signaled he would sign it ASAP. Not long after passage the President tweeted: "Glad the Senate finally passed the USA Freedom Act. It protects civil liberties and our national security. I'll sign it as soon as I get it."
The NSA data collection authority sunset at midnight Sunday night (May 31) after the Senate failed to vote either to pass the USA Freedom Act or to do a short-term reauthorization on the bulk collection authority exposed by NSA leaker Edward Snowden.
The USA Freedom Act has a six-month deadline for transitioning that collection to a new regime in which phone companies retain the data, rather than turning it over to the government en masse. Those companies also get liability protection for sharing that info. The bulk collection will be limited by narrower search terms, an advocate will be available to provide input to the FISA court when deciding what info the government needs to see. It also provides for more transparency about data collection.
It is unclear whether that new regime puts data retention requirements on VoIP providers, but presumably the government may want numbers and call logs from those as well.
Companies are not required to keep those records any longer than for normal business purposes, which is currently 18 months to two years.
Sen. Patrick Leahy (D-Vt.) called the passage a historic moment and an achievement that Congress should be proud of. Senate majority leader Mitch McConnell (R-Ky.) said he could not support the bill.