This photo-illustration shows the web flash pages for GCHQ, the British governments communications and electronic surveillance headquarters, and The Security Service (MI5), the governments internal security service, on a computer and smartphone in London, Friday, Nov. 25, 2016. After months of wrangling, Parliament has passed a contentious new snooping law that gives authorities — from police and spies to food regulators, fire officials and tax inspectors — powers to look at the internet browsing records of everyone in the country. (AP Photo/Alastair Grant)

This photo-illustration shows the web flash pages for GCHQ, the British governments communications and electronic surveillance headquarters, and The Security Service (MI5), the governments internal security service, on a computer and smartphone in ... London, Friday, Nov. 25, 2016. After months of wrangling, Parliament has passed a contentious new snooping law that gives authorities — from police and spies to food regulators, fire officials and tax inspectors — powers to look at the internet browsing records of everyone in the country. (AP Photo/Alastair Grant) (The Associated Press)

UK bill requiring firms to store Web histories becomes law

Features Associated Press

The U.K. government says a contentious internet surveillance bill that creates databases of Britons' online activity has become law.

Continue Reading Below

House of Commons Speaker John Bercow told lawmakers Tuesday that the Investigatory Powers Bill had received formal royal assent. It was passed by Parliament earlier this month.

Civil liberties groups have condemned the bill, which requires telecoms companies to keep for a year records of the websites users visited and the apps and messaging services they used, though not the individual pages they looked at or the messages they sent.

The Home Office says the law gives authorities the powers they need to disrupt terrorist attacks in a digital age.

It says some provisions in the new law "will require extensive testing and will not be in place for some time."