Nick Pickles, director of the Big Brother Watch campaign group, said: "This is an unprecedented step that will see Britain adopt the same kind of surveillance seen in China and Iran.

"This is an absolute attack on privacy online and it is far from clear this will actually improve public safety, while adding significant costs to internet businesses.”

Shami Chakrabarti, director of the civil rights group Liberty, said that both the Conservatives and the Liberal Democrats had resisted the plan when they were in opposition.

"There is an element of whoever you vote for the empire strikes back," she said.

"This is more ambitious than anything that has been done before. It is a pretty drastic step in a democracy.”

Some internet service providers themselves are also said to be alarmed by the move.

One senior industry source described it as “mass surveillance” that is “expensive and intrusive”.

Conservative backbencher Margot James said ministers would come under pressure to water down the proposals as the legislation passed through Parliament.

"I am sure there will be considerable pressure brought to bear as the proposals are debated for protections to be built in to protect people's privacy," she said.

Guy Herbert, general secretary of NO2ID campaign group said it was "astonishing brass neck from the Home Office, attempting to feed us reheated leftovers from the authoritarian end of the (Tony) Blair administration".

"It is not very far from a bug in every living room that can be turned on and turned off at official whim. Whatever you

are doing online, whoever you are in contact with, you will never know when you are being watched," he said.

The Home Office confirmed that ministers were intending to legislate "as soon as parliamentary time allows".

"It is vital that police and security services are able to obtain communications data in certain circumstances to investigate serious crime and terrorism and to protect the public. We need to take action to maintain the continued availability of communications data as technology changes," a spokesman said.

"Communications data includes time, duration and dialling numbers of a phone call, or an email address. It does not include the content of any phone call or email and it is not the intention of Government to make changes to the existing legal basis for the interception of communications."