Ministers are poised to pass emergency laws to require phone companies to log records of phone calls, texts and internet usage, but Labour and Liberal Democrats are warning that they will not allow any new law to become a backdoor route to reinstating a wider "snooper's charter".

Inter-party talks, likely to bear fruit this week, are being held against the backdrop of an increased terrorist threat posed by British Muslims being radicalised by travelling to fight in Syria, and by the continuing controversy over the revelations by former NSA contractor Edward Snowden.

Downing Street, the Home Office and the security services feel forced to act as a result of a European court of justice (ECJ) ruling in April that an EU data directive, implemented by a Labour government in 2009, was too sweeping and invaded the privacy of EU citizens.

The government appears to have secured support from Labour and the Lib Dems to reinstate the surveillance laws after the ECJ struck them down. But the Lib Dems are insisting that the plan will not amount to the reintroduction of the so-called "snooper's charter" – the communications data bill – that split the coalition and was ditched in 2013.

Any new "snooper's charter" bill would require a vast extension of the communications data that the phone and internet companies are currently required to retain. It would mean the retention of all data tracking everyone's use of the internet and mobile phones, including every web page visited, and not just the bare details kept for billing purposes by the companies.

The issue of data surveillance and the powers of the security services had in effect been shelved until after the election, but the ECJ ruling – which made the more basic collection of data illegal – has reopened the issue sooner than expected.

Labour is likely to suggest that the new emergency laws should have some form of "sunset clause" to review them after a set period. The shadow home secretary, Yvette Cooper, has also argued, in a major speech in March, for a wider review of the powers given to the security services under the Regulation of Investigatory Powers Act passed back in 2000 and now seen as outdated.

The government would need all-party support for the legislation to be passed through parliament quickly, giving Labour some leverage if it wants to ensure civil liberties are safeguarded.

A Liberal Democrat source said Nick Clegg was open-minded about some form of replacement for the data directive but stressed: "There is no question of a snooper's charter, watered down or otherwise, being introduced by this government."

The source disclosed: "The government does have to respond to the European court of justice ruling, which we are currently examining, and will respond in due course. But that is about the retention of existing powers rather than their extension."

The ECJ ruling in April said it was unlawful for the security services and government to require telecommunications firms to keep user data for up to two years. The power had been granted under a 2006 Data Retention Directive that was written after terror attacks in Spain, Britain and the US.

It required communications carriers to "retain traffic and location data as well as related data necessary to identify the subscriber or user" for between six and 24 months, although "it does not permit the retention of the content of the communication or of information consulted". Under the rules Britain allows retention for 18 months.

Challenges to the law were filed in both Austrian and Irish courts, arguing that the rules violated the EU Charter of Fundamental Rights.

The courts said the directive breached "the fundamental right to respect for private life and the fundamental right to the protection of personal data", saying applied "in a generalised manner [to] all individuals, all means of electronic communication and all traffic data without any differentiation, limitation or exception".

The ECJ also said the directive included no clear criteria on when national authorities could access the telecommunications data, nor on precisely how long companies should store the user information; and did not require data to remain within the EU, another requirement of the charter.

Since the ruling the Home Office has been reluctant to say how it will respond, and has been waiting for its lawyers to interpret the implications for the validity of British surveillance laws.

But it has left the communications providers and the government clearly exposed to a legal challenge.

In written answers, James Brokenshire, the minister for security at the Home Office, said data-holders, despite the ECJ ruling, had been instructed to observe regulations requiring them to retain data.

A Home Office spokesperson set out the formal position: "The retention of communications data is absolutely fundamental to ensure law enforcement have the powers they need to investigate crime, protect the public and ensure national security.

"We are carefully considering the European court of justice's judgment on data retention and are currently examining potential next steps."