Australia’s parliament passed a world-first law to force digital giants such as Facebook Inc. and Google pay local publishers for news content -- a move that may unleash more global regulatory action to limit their power.

The legislation was passed Thursday and will ensure “news media businesses are fairly remunerated for the content they generate,” Treasurer Josh Frydenberg said in a statement. “The code is a significant microeconomic reform, one that has drawn the eyes of the world on the Australian parliament.”

Regulators globally have been closely watching the legislation as they grapple with the advertising dominance of Facebook and Google, who now face the prospect of similar measures cascading around the world. Prime Minister Scott Morrison has said he’s discussed the new law with the leaders of India, Canada, France and the U.K.

The U.S. technology giants negotiated hard with the Australian government to extract concessions.

Alphabet Inc.-owned Google last year said it would shut down its search engine in Australia if the law was enacted. Meanwhile Facebook blocked news on its Australian platform in opposition to the legislation, a dramatic move that drew condemnation from Morrison.

After 11th-hour talks with Facebook CEO Mark Zuckerberg, the government agreed to amend the legislation and the social-media platform said it would switch the news back on.

Among key concessions, Google and Facebook are free to decide themselves which commercial deals to pursue. And if the government decides they’ve made a sufficient contribution to the local news industry, they won’t be designated under the law. If the government does decide to apply the code, the companies will be given one month’s notice, and will also have more time to strike deals with media publishers before they’re forced into final-offer arbitration as a last resort.

Google and Facebook may have managed to avoid the worst of the law’s measures for now -- but they aren’t off the hook, said Belinda Barnet, a senior lecturer in media at Swinburne University of Technology in Melbourne.

“The infrastructure provided by the law is in place,” she said. “Maybe that will make them behave.”

Nick Clegg, Facebook’s vice president of global affairs, said the changes “mean fair negotiations are encouraged without the looming threat of heavy-handed and unpredictable arbitration.”

“We look forward to agreeing to new deals with publishers and enabling Australians to share news links once again,” Clegg wrote in a blog post dated Feb. 24.

Clegg said Facebook temporarily switched off news in Australia because the legislation misunderstood the company’s relationship with publishers. Media businesses voluntarily post news on Facebook, which helps them reach a larger audience, he said.

“We neither take nor ask for the content for which we were being asked to pay a potentially exorbitant price,” he said. The platform has said just 4 per cent of the posts that people see in Facebook’s News Feed are news. Nevertheless, Facebook has invested US$600 million since 2018 to support the news industry globally and plans at least US$1 billion more over the next three years, he said.

Google, for its part, has independently struck deals to pay a string of Australian publishers for news, including News Corp.

Frydenberg said the “government is pleased to see progress by both Google and more recently Facebook in reaching commercial arrangements with Australian news media businesses.”

The new law will be reviewed by Treasury within one year to ensure it is working as intended.