Australia has passed a new law that will force tech companies to pay publishers for news content, setting the stage for potential, similar action in other countries. The new code, which the Australian parliament approved Thursday, “will ensure that news media businesses are fairly remunerated for the content they generate,” Australian Treasurer Josh Frydenberg said in a statement. The country’s unprecedented new law had been hotly debated in recent months. Facebook\n \n (FB) and Google \n \n (GOOGL)had opposed the initial version of the legislation, which would have allowed media outlets to bargain either individually or collectively with them — and to enter binding arbitration if the parties couldn’t reach an agreement. Facebook even shut down news pages in Australia last week in opposition to the legislation. But it said earlier this week that it would restore them after the country made some changes to the code, including a provision that “must take into account whether a digital platform has made a significant contribution to the sustainability of the Australian news industry through reaching commercial agreements with news media businesses.” Arbitration, meanwhile, will now only be used as a “last resort” following a period of “good faith” mediation. Facebook said after those revisions were made that the new agreement would allow it to “support the publishers we choose to.” It later revealed a deal with major Australian news company Seven West Media, with plans to sign more with other publishers. Google, meanwhile, had already been trying to get ahead of the new legislation by announcing partnerships with media organizations in Australia, including Seven and Rupert Murdoch’s News Corp\n \n (NWS). The Australian government said that the code will be reviewed by the Treasury department after a year to “ensure it is delivering outcomes that are consistent with the Government’s policy intent.” While Facebook has found a workaround to its problems in Australia, it’s still forcefully defending its opposition to similar far-reaching measures. “The events in Australia show the danger of camouflaging a bid for cash subsidies behind distortions about how the internet works,” Nick Clegg, the company’s vice president of global affairs, wrote in a blog post Wednesday. Clegg, a former UK deputy prime minister, opened up about the company’s decision to stop news sharing in the country in his statement, acknowledging that the move would “have felt abrupt and dramatic to many.” “It wasn’t a decision taken lightly,” he wrote, adding that the company had “been in discussions with the Australian government for three years trying to explain why this proposed law, unamended, was unworkable.” The company had no choice but to take swift action last week, he argued, “because it was legally necessary to do so before the new law came into force.” The showdown is set to continue. Similar case studies may soon emerge in other countries, with the United States and European Union facing growing pressure to adopt such measures. Canada’s government has also said that it plans to introduce legislation in the coming months. — Julia Horowitz contributed to this report.