The U.S. Senate has voted to limit the government’s ability to collect phone data, a policy that had been in place since the attacks of Sept. 11 2001, reports the BBC.
The USA Freedom Act extends the government’s ability to collect large amounts of data, but with restrictions.
The bill, which replaces the Patriot Act, had been backed by President Barack Obama as a necessary tool to fight terrorism.
Mr Obama later signed the bill into law.
The new law undoes a national security policy that had been in place since shortly after the attacks on 11 September 2001.
It replaces a National Security Agency (NSA) programme in which the spy agency collected personal data en masse.
The revelation of this programme by former NSA contractor Edward Snowden triggered a global public backlash.
Instead of receiving bulk quantities of data from telephone and internet companies the NSA will now be forced to request the information through a court order.
The data will also be stored on telephone and internet company servers rather than government servers.
The request must be specific to an individual entity such as a person, account, or electronic device.
A six-month transition will be in place as the policy shifts so that data storage remains with private companies, rather than on government servers.