WhatsApp and Facebook will be among several social media companies who will be forced to give the authorities access to the data of serious criminals under a new treaty between the UK and the US.
UK Home Secretary Priti Patel will sign an agreement next month that will mean the police and security services can apply to the courts for the release of encrypted messages.
The data access agreement will help the authorities prosecute serious criminals and will compel US social media companies to pass on the information.
Ms Patel previously warned social media companies to take greater responsibility for criminal activity on their platforms.
At present, companies only have to hand over data if there is a need for an “emergency disclosure” due to an imminent threat to life.
Despite being able to use the “mutual legal assistance” treaty to demand data, requests can take up to two years.
The new agreement will mean the authorities can submit requests for information to a judge or magistrate.
The agreement also means the two nations will not target people in each other's jurisdictions.
Britain has sought more assurances from the US that it will not use the data it acquires from British companies as evidence in cases that involve the death penalty.
Richard Walton, a former head of counterterrorism at London's Metropolitan Police, told The Times newspaper: "US tech giants have been inadvertently putting a veil over serious criminality and terrorism. It has tilted the balance in favour of criminals and terrorists. This [treaty] is very welcome; it will make a big difference."
There have been a number of serious criminal cases in the UK where a failure to retrieve the vital data has hampered investigations.
WhatsApp was criticised after it failed to report the last message of British extremist Khalid Masood, who killed five people in an attack in Westminster in 2017.