Messaging services including WhatsApp have issued a warning that the Government’s Online Safety Bill could open the door to “indiscriminate surveillance” of personal communications.

Bosses from firms Signal and Element were also signatories to the open letter calling on ministers to “urgently rethink” the Bill.

The Home Office argued that tech firms had a “moral duty” to ensure law enforcement agencies were not kept in the dark about “unprecedented levels of child sexual abuse on their platforms”.

The House of Lords will begin line-by-line scrutiny of the legislation in its committee stage on Wednesday.

The firms warned the legislation would give regulator Ofcom the power to try to force the release of private messages on end-to-end encrypted communication services.

The Government has argued that Ofcom will only be able to make companies use technology to identify child sexual abuse material in “appropriate and limited circumstances”.

But the tech bosses said: “As currently drafted, the Bill could break end-to-end encryption, opening the door to routine, general and indiscriminate surveillance of personal messages of friends, family members, employees, executives, journalists, human rights activists and even politicians themselves, which would fundamentally undermine everyone’s ability to communicate securely.”

WhatsApp boss Will Cathcart said: “Private messages are private.

“We oppose proposals to scan people’s private messages, and we’re proud to stand with other apps to defend encryption and your right to privacy.”

UK-based Element has warned that it could be forced to move overseas if the “outright dangerous” legislation is passed in its current form.

Its chief executive, Matthew Hodgson, warned that rogue states would seek to exploit any access into encrypted systems introduced by the legislation.

“The UK wants its own special access into end-to-end encrypted systems,” he said.

“Bad actors don’t play by the rules. Rogue nation states, terrorists, and criminals will target that access with every resource they have.

“OSB is outright dangerous. It’s the cyber equivalent of Britain decommissioning its nuclear deterrent.”

A Home Office spokesman said: “We support strong encryption, but this cannot come at the cost of public safety.

“Tech companies have a moral duty to ensure they are not blinding themselves and law enforcement to the unprecedented levels of child sexual abuse on their platforms.

“The Online Safety Bill in no way represents a ban on end-to-end encryption, nor will it require services to weaken encryption.

“Where it is the only effective, proportionate and necessary action available, Ofcom will be able to direct platforms to use accredited technology, or make best endeavours to develop new technology, to accurately identify child sexual abuse content, so it can be taken down and the despicable predators brought to justice.”

Downing Street defended the plan, with the Prime Minister’s official spokesman insisting “it will not introduce routine scanning of private communication”.

“It is being developed to ensure it has the requisite safeguards so it doesn’t weaken, by default, end-to-end encryption, it is a targeted power to be used only when necessary and when other measures cannot be used,” the spokesman said.

Richard Collard, from the NSPCC children’s charity, urged the Government to resist the tech firms’ calls to water down the legislation.

“Online child sexual abuse is taking place at record levels and its victims who are predominantly girls are being targeted at an increasingly younger age,” he said.

“The front line of this fight to keep our children safe is private messaging and it would be inconceivable for regulators and law enforcement to suddenly go into retreat at the behest of some of the world’s biggest companies.”