SYDNEY - Security agencies will gain greater access to encrypted messages under new laws in Australia. The legislation will force technology companies such as Apple, Facebook and Google to disable encryption protections to allow investigators to track the communications of terrorists and other criminals. It is, however, a controversial measure.

Australian law enforcement officials say the growth of end-to-end encryption in applications such as Signal, Facebook’s WhatsApp and Apple’s iMessage hamper their efforts to track the activities of criminals and extremists.

End-to-end encryption is a code that allows a message to stay secret between the person who wrote it and the recipient.

PM: Law urgently needed

But a new law passed Thursday in Australia compels technology companies, device manufacturers and service providers to build in features needed for police to crack those hitherto secret codes. However, businesses will not have to introduce these features if they are considered “systemic weaknesses,” which means they are likely to result in compromised security for other users.

The Australian legislation is the first of its kind anywhere.

Prime Minister Scott Morrison said the new law was urgently needed because encoded messaging apps allowed “terrorists and organized criminals and … pedophile rings to do their evil work.”

Critics: Law goes too far

However, critics, including technology companies, human rights groups, and lawyers, believe the measure goes too far and gives investigators “unprecedented powers to access encrypted communications.”

Francis Galbally, the chairman of the encryption provider Senetas, says the law will send Australia’s tech sector into reverse.

“We will lose some of the greatest mathematicians and scientists this country has produced, and I can tell you because I employ a lot of them, they are fabulous, they are well regarded, but the world will now regard them if they stay in this country as subject to the government making changes to what they are doing in order to spy on everybody,” he said.

Galbally also claims that his company could lose clients to competitors overseas because it cannot guarantee its products have not been compromised by Australian authorities.

Tech giant Apple said in October that “it would be wrong to weaken security for millions of law-abiding customers in order to investigate the very few who pose a threat.”

The new law includes penalties for noncompliance.