Controversial emergency laws will be introduced into the Commons next Monday to reinforce the powers of security services to require internet and phone companies to keep records of their customers' emails and calls.

The move follows private talks over the past week and the laws will have the support of Labour and the Liberal Democrats on the basis that there will be a sunset clause and a new board to oversee the functioning of the powers.

There will also be annual transparency reports setting out how frequently police and security services are using the legislation. There will also be a new high-level diplomat appointed to smooth relations with the US over surveillance.

I'll be explaining today why emergency legislation is needed to maintain powers to help keep us safe from those who would harm UK citizens.

The laws will expire in 2016, requiring fresh legislation after the election. The Regulation of Investigatory Powers Act will be reviewed between now and 2016 to make recommendations for how it could be reformed and updated. Lib Dems insist the new legislation does not represent an extension of existing surveillance powers or the introduction of the snooper's charter sought by the Home Office and long opposed by the deputy prime minister, Nick Clegg.

There will be no power to look at the content of phone calls, only location, date and the phone numbers. Government sources say they have been forced to act due to European court of justice ruling in April saying the current laws invaded individual privacy. The government says if there had been no new powers there would have been no obligation on phone and internet companies to keep records if there was a UK court challenge to the retention of data.

Backbench MPs will ask why the new powers are being rushed through the Commons when the European court of justice ruling was passed in April and the Home Office has refused to discuss the implications of the ruling.

David Cameron said on Thursday: "It is the first duty of government to protect our national security and to act quickly when that security is compromised. As events in Iraq and Syria demonstrate, now is not the time to be scaling back on our ability to keep our people safe. The ability to access information about communications and intercept the communications of dangerous individuals is essential to fight the threat from criminals and terrorists targeting the UK.

"No government introduces fast track legislation lightly. But the consequences of not acting are grave. I want to be very clear that we are not introducing new powers or capabilities – that is not for this parliament. This is about restoring two vital measures ensuring that our law enforcement and intelligence agencies maintain the right tools to keep us all safe."

Clegg said: "We know the consequences of not acting are serious, but this urgency will not be used as an excuse for more powers, or for a 'snooper's charter'.

"I believe that successive governments have neglected civil liberties in the pursuit of greater security. We will be the first government in many decades to increase transparency and oversight, and make significant progress in defence of liberty. But liberty and security must go hand in hand. We can't enjoy our freedom if we're unable to keep ourselves safe."

A Lib Dem source said: "We must ensure our country and its citizens are safe, but as Liberal Democrats we will also do so in a way that improves, not erodes our civil liberties, and rolls back, not increases unchecked intrusion into our lives.

"We know the consequences of not acting are serious, but absolutely adamant this urgency will not be used as an excuse for more powers, or for a snooper's charter. We have blocked a snooper's charter before, and will continue to do so."

David Cameron is to explain why the emergency legislation is needed at a press conference with Nick Clegg. Photograph: Amer Ghazzal/Barcroft Media

No 10 said the ECJ rulings had struck down regulations to retain communications data for law enforcement purposes for up to 12 months. Unless they have a business reason to hold this data, internet and phone companies will start deleting it, which has serious consequences for investigations, which can take many months and which rely on retrospectively accessing data for evidential purposes.

Ministers added that some companies had already been calling for a clearer legal framework

Labour backbencher Tom Watson described the move as a "stitch-up". He said: "There has been a deal and it had been railroaded through so my advice to MPs is there is no point turning up for work next week because there has been a political deal." He said he had not seen the detail of the legislation and promised to vote against the timetable.

He added: "The government was aware of this ECJ ruling six weeks ago and what they are doing is railroading this through. No one in civil society has got a chance to be consulted." The shadow cabinet had not seen the proposals until this morning, he added.