Britain's security services and police would have their right to trawl in bulk for online data boosted under a proposed new law to recast surveillance powers published Tuesday.
The new Investigatory Powers Bill would require websites to keep Internet connection records for up to a year and allow law enforcement agencies to access them to help with investigations.
The proposals have already drawn a hostile response from technology companies and privacy campaigners, who say the case for such wide-reaching powers has not been made.
"Powers for bulk interception and bulk equipment interference—hacking by any other name—leaves the right to privacy dangerously undermined and the security of our infrastructure at risk," said Gus Hosein, executive director of Privacy International.
The bill is being published amid a global debate on how far countries should go in snooping on citizens' private data following leaks by former intelligence contractor Edward Snowden.
In the US, Apple is locked in a legal battle with the FBI over a warrant which seeks to make it unlock an iPhone used by one of the attackers who shot dead 14 people in San Bernardino, California, in December.
Home Secretary Theresa May insisted that the British government was "not seeking sweeping new powers" in what would be the first overhaul of surveillance laws for 15 years.
"Terrorists and criminals are operating online and we need to ensure the police and security services can keep pace with the modern world and continue to protect the British public from the many serious threats we face," she added.
Safeguards in the bill include a new "double-lock" authorisation process meaning that both the home secretary and a judicial commissioner will have to review applications for interception warrants.
The bill also reinforces existing encryption powers, allowing officials to ask technology companies to provide content where it is deemed "practicable".
The House of Commons is expected to hold its first debate on the bill in two weeks.
Ministers hope to pass the legislation by the end of the year, when existing powers expire.
Over 100 politicians, campaigners and academics signed a letter to the Daily Telegraph Tuesday warning the government against rushing the bill through parliament.
Explore further: Lawmakers say UK's draft online spying law needs changes