Communications companies will be required to store records of customers’ phone and internet use for 12 months in long-awaited measures overhauling the laws on surveillance by the state being published today.

Theresa May, the Home Secretary, has dropped several measures from legislation – dubbed the “Snooper’s Charter” – which was blocked by the Liberal Democrats in the Coalition government.

But the draft Investigatory Powers Bill will come under attack from civil liberties groups for increasing the ability of the intelligence services to obtain access to the personal internet use of millions of citizens and to mount “data-mining” exercises.

It will also face criticism from MPs and peers from across the spectrum if it fails to transfer the authority to issue warrants from ministers to judges. Mass collection of information will enable GCHQ to launch the data-mining programmes which police and the intelligence agencies argue is crucial for tracking terrorists, as well as uncovering paedophiles and finding missing people.

The extent of surveillance by the Government’s Cheltenham listening-post was detailed in 2013 in documents obtained by the US National Security Agency whistleblower Edward Snowden. The new Bill will put the practices on a statutory footing.

Edward Snowden recently claimed that GCHQ has the power to hack into phones without their owners' knowledge (AFP)

Government sources said the measures will ensure any access to such internet connection records will be strictly limited. Much attention will focus on the system under which surveillance warrants are authorised. Ms May is expected to announce that they will initially be issued by Cabinet ministers but then be reviewed by security-cleared senior judges.

David Cameron described the Bill as “one of the most important pieces of legislation” before Parliament over the next five years. He told the Cabinet that its measures would go to “heart of the Government’s duty to keep the British public safe”.

Sources disclosed the legislation would strengthen the safeguards governing local authorities’ access to data. Councils will be fined if they abuse their powers and their access to records of internet, telephone and internet use will be strictly limited to investigation of criminal offences.

“Communications data is an essential tool for the full range of law enforcement, including serious offences investigated by local authorities like rogue traders and benefit fraud,” a source said. “Sometimes communications data is the only way to identify offenders, particularly where offences are committed online. it is important people understand that communications data is only ever used in a necessary, proportionate and accountable way.”

Whistleblowing controversies of the last decade Show all 12 1 /12 Whistleblowing controversies of the last decade Whistleblowing controversies of the last decade Edward Snowden NSA leak Articles in The Guardian revealed that the US and the UK spied on foreign leaders and diplomats at the 2009 G20 summit. Reuters Whistleblowing controversies of the last decade WikiLeaks' US diplomatic cables leak In 2009, former US soldier Chelsea Manning, downloaded hundreds of thousands of classified US Government documents, and passed them on to Jullian Assange's whistleblowing website WikiLeaks. Among the documents were 250,000 State Department diplomatic cables. One disclosed the close relationship between Russian President Vladimir Putin and then-Italian Prime Minister Silvio Berlusconi, the Guardian reported. Allegations included "lavish gifts", lucrative energy contracts and the use by Berlusconi of a "shadowy" Russian-speaking Italiango-between. Getty Images Whistleblowing controversies of the last decade WikiLeaks' US diplomatic cables leak WikiLeaks' US diplomatic cables leak: In a revelation which bruised the UK's 'special relationship' with the US, WikiLeaks published conversations by US commanders criticising Britain's military operations in Afghanistan. Getty Images Whistleblowing controversies of the last decade WikiLeaks' US diplomatic cables leak WikiLeaks' US diplomatic cables leak: One document disclosed startling levels of corruption in Afghanistan, including an incident involving the then vice-president, Ahmad Zia Massoud, who was reportedly stopped and questioned in Dubai when he flew into the emirate with $52m in cash. Getty Images Whistleblowing controversies of the last decade WikiLeaks' US diplomatic cables leak Another cable documented fears in Washington over Pakistan's nuclear weapons programme, in a volatile country with a strategic position in the Middle East. PA Whistleblowing controversies of the last decade WikiLeaks' US diplomatic cables leak Day four of the gradual drip of leaks exposed allegations that Russia and its intelligence agencies are using mafia bosses to carry out criminal operations, with one cable reporting that the relationship is so close that the country has become a "virtual mafia state". Getty Images Whistleblowing controversies of the last decade Edward Snowden NSA leak In 2013, The Guardian published classified US National Security Agency (NSA) documents, from a then anonymous whistleblower. Four days later he was exposed as former NSA contractor Edward Snowden. A month after the initial leak, the New York Times allegeded that the NSA received emails, video clips, photos, voice and video calls, social networking details, logins and other data held by a range of US internet firms. Whistleblowing controversies of the last decade Edward Snowden NSA leak Since Snowden revealed that the US had eavesdropped on German Chancellor Angela Merkel's phone, German-US relations have been strained. In May 2014, Mrs Merkel said still had significant differences with the United States over surveillance practices and that it was too soon to return to “business as usual," according to the New York Times. Getty Images Whistleblowing controversies of the last decade Edward Snowden NSA leak On 7 June, The Guardian published the Presidential Policy Directive 20, whcih included a list of potential targets for cyber-attacks by the US Government. Rex Features Whistleblowing controversies of the last decade Samy Kamkar iPhone and Android exposé In April 2014, hacker and researcher Samy Kamkar revealed that Android phones collect user location data every few seconds. Files are then transited to Google several times an hour. Getty Images Whistleblowing controversies of the last decade Samy Kamkar iPhone and Android exposé It is believed Apple and Google are using the data to better target adverts to smartphone users, according to The Guardian. Getty Images Whistleblowing controversies of the last decade Samy Kamkar iPhone and Android exposé The two companies have since justified the collection of data. In a letter to the US congress Apple confirmed it collected the data and said that, in order to be useful, "the databases [of tower and network locations] must be updated continuously". A Google spokesman told the Guardian Android phones explicitly asked to collect anonymous location data when users turned them on. Getty Images

The draft Bill reflects wide agreement that the 15-year-old legislation governing communications is fragmented and outdated given the rapid pace of technological change.

The Government insists that its measures will strengthen oversight of surveillance and improve the transparency governing the intelligence services’ activities. It said it had blocked a request from the police to allow full access to web-browsing habits and ruled out banning the encryption of messages.