(Reuters) — Australia on Friday proposed new laws to compel companies such as U.S. social media giant Facebook and device manufacturer Apple to provide security agencies access to encrypted messages.

The measures will be the first in an expected wave of global legislation as pressure mounts on technology companies to provide such access after several terror suspects used encrypted applications ahead of attacks.

Australia, a staunch U.S. ally, is on heightened alert for attacks by home-grown radicals since 2014 and authorities have said they have thwarted several plots, although Prime Minister Malcolm Turnbull said law enforcement needed more help.

“We need to ensure the internet is not used as a dark place for bad people to hide their criminal activities from the law,” Turnbull told reporters in Sydney.

“The reality is, however, that these encrypted messaging applications and voice applications are being used obviously by all of us, but they’re also being used by people who seek to do us harm.”

Australia’s proposal will require device manufacturers and technology companies to help its law enforcement agencies intercept and read messages sent by suspects.

The proposal, to be introduced when parliament resumes in August, could be adopted within months, lawmakers have said.

But the plan sets the scene for a clash between Australia’s government and some of the world’s biggest technology companies.

Apple, which declined a request by Reuters to comment on the proposal, has previously resisted sharing such information, citing privacy concerns.

Facebook also rejected the need to introduce the new law, insisting it already had a system in place to work alongside security agencies, while the new legislation could not be implemented on an individual basis.

“Weakening encrypted systems for them would mean weakening it for everyone,” said Antonia Sanda, a spokeswoman for Facebook.

While Australia is poised to become the first country to adopt laws on encrypted messages, other nations have said they will introduce similar laws.

Several European nations, including France and Britain, have committed to new laws requiring access to encrypted messages, a key issue in this month’s talks among the “Five Eyes” intelligence-sharing network.