It creates a new legal framework covering law enforcement surveillance tactics.

Powers covered by the new regime include:

Internet connection records: Communications firms will be required to store data relating to what sites a device connects to – but not a user’s full browsing history or the content of a communication – for up to a year

Bulk powers: The tactics used by MI5, MI6 and GCHQ to collect vast troves of data

Equipment Interference: The official phrase used for operations involving hacking into suspects’ smartphones and PCs, which are seen as increasingly important as advanced encryption makes monitoring targets more difficult.

The Bill includes the introduction of a “double lock” regime for the most intrusive techniques, so that warrants issued by a Secretary of State will require the approval of a senior judge.

A new Investigatory Powers Commissioner will be created and those misusing the powers could face sanctions including criminal charges.

Home Secretary Amber Rudd said: “This Government is clear that, at a time of heightened security threat, it is essential our law enforcement, security and intelligence services have the powers they need to keep people safe.

“The internet presents new opportunities for terrorists and we must ensure we have the capabilities to confront this challenge. But it is also right that these powers are subject to strict safeguards and rigorous oversight.