The government will announce that it is rushing through emergency legislation underpinning the state's right to keep personal data held by internet and phone companies.

Labour is expected to accept the bill on the basis that it will simply restore what the government believed to be the law before the European Court of Justice ruled in April that an EU directive on privacy retention had over-reached its powers and amounted to an invasion of privacy.

But, as part of the deal, the opposition has won agreement that ministers will launch a review of the Regulation of Investigatory Powers Act passed in 2000. The act is seen as the source of excessive surveillance by the security services.

It is likely that the legislation will be passed through the Commons next week, but the Labour backbench MP Tom Watson said it would be an outrage for such a fundamental potential threat to civil liberties to be announced to the Commons on Thursday when few MPs are likely to be present.

The government has been prompted to act due to a high court challenge to its continued collection and retention of personal data from internet and phone companies, in spite of the ECJ ruling. The judicial review claim in the London high court against the home secretary, Theresa May, is challenging regulations from 2009 under which the British government requires internet and phone companies to retain personal communications data for 12 months and allows the police and security services to access it.

The urgent legislation is expected to be introduced as an independent bill or as amendments to the serious crime bill now going through parliament.

Watson said: "Regardless of where you stand on the decision of the European Court of Justice (ECJ), can you honestly say that you want a key decision about how your personal data is stored to be made by a stitch-up behind closed doors and clouded in secrecy? None of your MPs have even read this legislation, let alone been able to scrutinise it.

"The very fact that the government is even considering this form of action, strongly suggests that it has an expectation that the few people on the Liberal Democrat and Labour front benches who have seen this legislation are willing to be complicit."

Theresa May in the Commons. Photograph: BBC Parliament

The powers to require internet and phone companies to store the personal communications data was introduced across Europe in the wake of the 7 July 2005 bombings. Two weeks ago, the head of the National Crime Agency warned of the impact the loss of the powers would have on the capacity of the police to combat terrorism and serious crime cases.

The ECJ ruling this year said the routine collection of location and traffic data about phone calls, texts, emails and internet use and its retention for between six months and two years meant a very detailed picture of an individual's private life could be constructed.

The judges said the blanket collection of such personal data, for a wide range of purposes far beyond serious crime and terrorism and without detailed safeguards, amounted to a severe incursion of privacy.

They set out 10 principles that any new legislation needed to include to comply with human rights law. These included restricting data retention to that connected to a threat to public security covering a particular time period, location or specific suspects, and limiting retention periods to what was "strictly necessary".

Privacy campaign groups fear the move will simply mean the continuation of "privatised snooping". Jim Killock, the director of Open Rights Group, said: "Forcing ISPs to retain the data of every UK citizen is disproportionate and unnecessary. Rather than rushing through a new law, let's get parliament to look at this and get this right.

"If the government is to bring forward legislation, it must comply with the 10 principles set out in the ECJ judgment, in particular the ending of the mass retention of our personal data. This is no longer acceptable."

Emma Carr, acting director of the Big Brother Watch privacy campaign, added: "It is a basic principle of a free society that you don't monitor people who are not under suspicion. Considering the snoopers' charter has already been rejected by the public as well as by the highest court in Europe, it is essential that the government does not rush headfirst into creating new legislation.

"The EU's data retention laws privatised snooping, meaning companies were paid by governments to record what citizens were doing and retain that information for a year. We need to get back to a point where the police monitor people who are actually suspected of wrongdoing rather than wasting millions every year requiring data to be stored on an indiscriminate basis."