Australia is set to pass a bill giving police and intelligence agencies access to encrypted messages on platforms such as WhatsApp, despite protests from civil libertarians and tech giants including Facebook Inc. and Google.

The main opposition Labor party said it reached an in-principle agreement to pass the legislation after the government agreed to changes that would “ensure there is better oversight and limitation of the powers in this bill,” Shadow Attorney-General Mark Dreyfus said in a statement.

Prime Minister Scott Morrison has said the new powers would help foil terrorist attacks and criminals, including child pornographers who use encrypted messaging apps. The legislation could force companies such as Facebook and Google to help de-crypt such private communications.

The Digital Industry Group, an industry association whose members include Facebook and Google, campaigned against the bill in a loose alliance with Amnesty International and the Human Rights Law Center.

Lobby group Digital Rights Watch said the agreement between Labor and the government had addressed “some extremely dangerous elements” of the legislation.

“But the fundamental fact remains that the powers being sought by law enforcement are ill-informed, badly drafted and a gross overreach,” the group said in a statement. “This bill is still deeply flawed, and has the likely impact of weakening Australia’s overall cyber-security, lowering confidence in e-commerce, reducing standards of safety for data storage and reducing civil right protections.”

Once the bill becomes law, security and intelligence agencies, and federal and state police, can request or compel tech companies to help carry out surveillance on the encrypted communications of individuals suspected of involvement in terrorism, child sex crimes, or other serious criminal activity.

Dreyfus said the government’s “important concessions” in the latest version included defining “system weakness.” The draft bill specifically precluded agencies from demanding that technology providers install a “systemic weakness” affecting all users on all devices, but didn’t define it.

Porter said if there is a dispute over whether an agency’s “Technical Capability Notice” ordering a company to help access a suspect’s data amounts to unlawfully asking it to build a systemic weakness, the matter will be adjudicated by two people, an expert and a retired judge, who will report to the Attorney-General.

“That is a very, very safe, very, very fair system,” Porter said.

©2018 Bloomberg L.P. All rights reserved. Used with permission