Facebook said Tuesday it will lift a contentious ban on Australian news and pay local media companies for content, after a last-gasp deal on pending landmark legislation.
Australia's Treasurer Josh Frydenberg announced a face-saving compromise that will see Google and Facebook plunge tens of millions of dollars into the struggling local news sector.
In return the US digital firms will, for now, avoid being subjected to mandatory payments that could cost them vastly more and create what they see as an alarming global precedent.
Just hours after the compromise was unveiled, Facebook announced its first proposed deal with an Australian media company, Seven West, and was said to be pursuing commercial deals with other local news organisations.
The company is expected to use the content to launch a dedicated news product in Australia later this year.
"As a result of these changes, we can now work to further our investment in public interest journalism, and restore news on Facebook for Australians in the coming days," said Will Easton, managing director of Facebook Australia.
The social media firm sparked global outrage last week by blacking out news for its Australian users in protest at the proposed legislation, and inadvertently blocking a series of non-news Facebook pages linked to everything from cancer charities to emergency response services.
Prime Minister Scott Morrison had angrily accused Facebook of making a decision to "unfriend" Australia.
Google has already brokered deals worth millions of dollars with local media companies, including the two largest: Rupert Murdoch's News Corp and Nine Entertainment.
Commentators described the eleventh-hour amendments -- which came as parliament looks set to pass the law this week -- as "a reasonable compromise".
"Everybody can walk away saying, well we got what we wanted," University of New South Wales business professor Rob Nicholls told AFP.
Both companies now have an additional two months to reach further agreements that would stave off binding arbitration.
The tech firms had fiercely opposed the legislation from the get-go, fearing it would threaten their business models.
In particular, the companies objected to rules that made negotiations with media companies mandatory and gave an independent Australian arbiter the right to impose a monetary settlement.
That process will now be avoided if companies are deemed to have made a "significant contribution" to the Australian news industry through unspecified "commercial agreements".
"We now face the strange possibility that the news media mandatory code could be passed by parliament and it applies to precisely no one," said Marcus Strom, head of the Media Entertainment and Arts Alliance, a union.
"It will just sit in the Treasurer's (drawer) as a threat to misbehaving digital companies."
Google was also keen to avoid creating a precedent that platforms should pay anyone for links, something that could make their flagship search engine unworkable.
Facebook -- which is much less reliant on news content -- had initially said being forced to pay for news was simply not worth it and shut down content.
"There is no doubt that Australia has been a proxy battle for the world," said Frydenberg.
Critics of the law say it punishes innovative companies and amounts to a money grab by struggling but politically connected traditional media.
Thousands of journalism jobs and scores of news outlets have been lost in Australia alone over the past decade as the sector watched advertising revenue flow to the digital players.
For every $100 spent by Australian advertisers today, $49 goes to Google and $24 to Facebook, according to the country's competition watchdog.
Tech insiders see the legislation as driven, in particular, by Rupert Murdoch's News Corp, which dominates the local media landscape and has close ties with Australia's conservative government.
A new provision in the law gives Facebook and Google more discretion over who they do deals with, and what the sums involved would be.
"We have come to an agreement that will allow us to support the publishers we choose to, including small and local publishers," said Facebook vice president for global news partnerships Campbell Brown.
Facebook and Google could still face the prospect of having to replicate deals with media worldwide, as the European Union, Canada and other jurisdictions move to regulate the sector.
Since their emergence around the turn of the century, Google and Facebook have been largely unregulated and have grown into two of the world's largest and most profitable companies.
But a string of scandals about misinformation, privacy violations, data harvesting and their virtual monopoly on online advertising has triggered the attention of watchdogs.