The United States Senate has passed landmark legislation on Tuesday that ends the government's National Surveillance Agency's (NSA) bulk telephone data dragnet, reining in the most controversial surveillance program since the 9/11 attacks of 2001.
The House of Representatives has already passed the measure, which also reauthorizes key national security programs that had lapsed early this week.
With the Senate rejecting Republican attempts to modify the bill, it now goes to the U.S. President Barack Obama for his signature.
The vote in the Senate on Tuesday was 67-32. The House already has passed the bill, and President Obama plans to sign it quickly.
The program will be replaced by a program that keeps the records with phone companies but allows the government to search them with a warrant.
Senate Republican leaders opposed the House bill but were forced to accept it unchanged after senators rejected last-ditch attempts to amend it.