Facebook has announced it will restore news content to its users in Australia.
The tech giant has blocked news to Australians on its platform since last Thursday amid a dispute over a proposed law which would force it and Google to pay news publishers for content.
Australian Treasurer Josh Frydenberg said Facebook chief Mark Zuckerberg had told him the ban would end "in the coming days", after the pair had talks.
Mr Frydenberg said amendments would be made to the law.
"Facebook has re-friended Australia," he told reporters in Canberra on Tuesday.
The government has been debating the law - seen as a possible test case for regulation globally - in the Senate, after it was passed in the lower house last week.
Why did Facebook block news content?
Last Thursday, Australians woke up to find they could not access or share any news stories on their accounts.
Facebook argued it had been forced to block Australian news in response to the proposed legislation.
The government's news code aims to set up a "fairer" negotiation process between the tech giants and news companies over the value of news content.
But it has been strongly opposed by Facebook and Google - both argue the code misunderstands how the internet works. Facebook has also said it gets little commercial gain from news content.
But the Australian government says the code is needed to "level the playing field" for news publishers, which have seen profits slump in the internet age.
By Tuesday evening it was reported that multiple companies, including the Guardian Australia and Rupert Murdoch's News Corporation, had resumed talks with the social media giant.
Seven West Media, a large media company, then announced in a statement they had signed a letter of intent to provide its news content to the platform after reaching an agreement.
Why has Facebook changed its mind?
Facebook said on Tuesday that it had been reassured by recent discussions with the government.
"Going forward, the government has clarified we will retain the ability to decide if news appears on Facebook so that we won't automatically be subject to forced negotiation," said Campbell Brown, vice president of global news partnerships at Facebook.
"We have come to an agreement that will allow us to support the publishers we choose to, including small and local publishers."
Facebook already has its own "showcase" product - Facebook News Tab - through which it pays media organisations a fee to display their stories on its platform. This feature however, is only available in the UK and US.
Google had also threatened to withdraw its primary search engine from Australia, but the company has recently agreed deals with local media companies.
Facebook's move to ban Australian news was a big risk last week. It made global headlines - not least because it also initially restricted some government health-department and emergency services pages.
Some have been perplexed by the move. Why would Facebook openly court such negative headlines?
Critics called the move undemocratic - authoritarian even. There are claims that fake news on the platform increased since the ban - though that's difficult to prove.
But Facebook isn't the only voice to say these new laws are badly drafted.
Sir Tim Berners-Lee, the creator of the web, said he was concerned that forcing companies to pay for certain content could make the internet "unworkable".
The proposed law was also seen by some as heavily influenced by the lobbying operations of media mogul Rupert Murdoch's News Corp - which owns many of Australia's major newspapers. The law's intention was to protect struggling journalism, not to line the pockets of a media dynasty.
There does now appear to be movement on both sides. Crucially, Facebook objected to the idea of a "forced negotiation' with news outlets, which it now believes is off the table.
However although both sides have moved, and both will claim victory, this whole episode has damaged Facebook.
Politicians from across the world offered support to the Australian government - there were even accusations of bullying by the social network.
And considering Facebook desperately doesn't want these laws replicated in other countries, antagonising Australia's allies may not have been the smartest of moves.
What does the government say now?
The government and Facebook have reached a compromise of sorts.
Australian authorities will introduce four further amendments, including one that means the government may not apply the code to Facebook if it can demonstrate a "significant contribution" to local journalism.
They include a two-month mediation period before government-enforced arbitration kicks in - giving parties more time to reach a private deal.
Australia's largest locally-owned company Nine Entertainment said it was "pleased" the government had found a compromise and was looking forward to resuming talks about a commercial arrangement.