Theresa May has bowed to pressure from MPs and toughened up privacy protections in new surveillance laws published today with a view to getting them in place by the end of the year.

A draft version of the Investigatory Powers Bill – the so-called “snooper’s charter” – faced stinging criticism in three parliamentary reports in January.

Sources said the Home Secretary had revised key sections of the Bill in response, with the aim of heading off objections that the legislation handed too much power to the security services to eavesdrop and bug communications.

However, the concessions are unlikely to meet the objections of civil liberties groups or to reassure parliamentary critics who say the legislation is being rushed through parliament.

The Bill will now:

Require security agencies to reapply for equipment interference warrants – the power to hack computers and telephones – every three rather than five days.

Guarantee that telecoms companies will only be asked to remove encryption they have fitted on devices – and only where it is “practicable”.

Prevent security agencies from asking foreign countries to spy on their behalf unless they have a warrant approved by a Cabinet minister.

Force the security services and police to obtain a senior judge’s permission before accessing communications data to identify a journalist’s source.

Set out “strict codes of practice” detailing why the powers in the Bill will be used and why they are needed.

A source said: “We have considered the committees’ reports carefully and the Bill we are bringing forward today reflects the majority of their recommendations. We have strengthened safeguards, enhanced privacy protections and bolstered oversight arrangements.