Queen's Speech: New monitoring powers 'to tackle terrorism'
New laws to give police and spies greater powers to monitor internet and phone use are in the Queen's Speech.
Downing Street said that measures in the Investigatory Powers Bill would provide the authorities "with the tools to keep you and your family safe".
It will "address gaps" in intelligence gathering and access to communications data which is putting "lives at risk".
But civil liberties campaigners claim it will pave the way for mass surveillance of UK citizens.
Home Secretary Theresa May's efforts to introduce a similar bill in 2012, dubbed the "snooper's charter" by critics, were blocked by the Liberal Democrats.
The new bill is designed to "maintain the ability of intelligence agencies and law enforcement to target the online communications of terrorists, paedophiles and other serious criminals".
Details of how it will work will be published in the next few days.
It is thought likely to require internet service providers and mobile operators to log much more data about what their customers are doing, including data on who people call, text, tweet and instant message, what games they play, when they post on social networks and who they send webmails.
The government has come under growing pressure to do more to respond to the fallout from the conflicts in Iraq and Syria and, specifically, the threat posed by British jihadists returning to the UK after fighting in the two countries.
The police have long argued that their ability to track the online communications of potential suspects is heavily circumscribed and the the law is not keeping pace with advances in technology.
But civil liberties campaigners fear it will lead to mass surveillance.
Analysis by BBC Home Affairs Correspondent Daniel Sandford
Essentially the government wants to upgrade the law so that is can do all the things it used to do with the post and telephones with all the plethora of online communications that now exist.
A review by the "Independent Reviewer of Terrorism Legislation" David Anderson QC will feed into this.
The Bill will be very controversial. It is strongly opposed by many Liberals, and civil liberties groups, and the idea became even more controversial after the Edward Snowden revelations.
Jim Killock, executive director of The Open Rights Group, said: "The government is signalling that it wants to press ahead with increased powers of data collection and retention for the police and GCHQ, spying on everyone, whether suspected of a crime or not.
"This is the return of the 'snooper's charter', even as the ability to collect and retain data gets less and less workable.
"We should expect attacks on encryption, which protects all our security. Data collection will create vast and unnecessary expense."
Renate Samson, chief executive of Big Brother Watch, said: "Whilst the title may have changed from a Communications Data Bill to an Investigatory Powers Bill it will be interesting to see whether the content has radically changed.
"We have yet to see real evidence that there is a gap in the capability of law enforcement or the agencies' ability to gain access to our communications data."
The Investigatory Powers Bill is one of 26 proposed laws included in the first all-Conservative Queen's Speech since 1996.
The Conservatives are also proposing new steps to tackle extremism, including giving the home secretary new powers to ban extremist groups and allowing the authorities to close down premises being used to "support extremism".
It will also include more powers for watchdog Ofcom to take action against TV channels that "broadcast extremist content".
Downing Street said there would be "appropriate safeguards and oversight arrangements" and it would take into account a yet unpublished review of existing counter-terrorism legislation undertaken by the independent reviewer David Anderson.