(Bloomberg) -- Social media platforms will be required to reveal the identities of anonymous online trolls or face making defamation payouts under new legislation proposed by Australian Prime Minister Scott Morrison.

People who believe they have been defamed online will be able to get court orders directing online giants such as Twitter Inc. and Meta Platforms Inc., the company formerly known as Facebook, to identify the individuals responsible for posts, Morrison said at a press conference Sunday. If the social media platforms fail to do so, they will have to pay defamation costs.

“The online world presents many great opportunities, but it comes with some real risks and we must address these,” he said. The government “is making sure people are responsible for what they say” and ensuring companies “are on the hook” for damaging material posted to their platforms, he added.

Under the current law, social media companies are not considered to be the publishers of material posted to their platforms. If a user makes defamatory comments on a Facebook page, for instance, legal responsibility lies with the owner of the page. The bill is due to be discussed in parliament this week, and comes after the country’s highest court ruled that media companies can be held liable for comments left on their accounts by members of the public.

A spokeswoman for Meta said the company is waiting to see the proposals in more detail before commenting. Twitter didn’t immediately respond to requests for comment made outside of office hours.

Australia’s eSafety commissioner, Julie Inman Grant, said previously that such a policy would be difficult to execute. “It would be very challenging, I would think, for Facebook for example to re-identify or identify its 2.7 billion users,” she said last year during a Senate Estimates hearing.

In February, Meta’s Facebook responded to a separate attempt to regulate how it does business in Australia with a show of force. It briefly blocked all news sharing in the country in response to a proposal that it should be required to pay publishers for that content.

©2021 Bloomberg L.P.