Prime Minister Scott Morrison has accused tech giants of taking a free ride on Australian media, claiming credit for forcing them to pay for news.
The world-first media bargaining code will force online powerhouses including Facebook and Google to pay for displaying news content.
Facebook will reinstate news pages after banning them during a dispute with the government about the terms of the code.
Google threatened to pull its search engine from Australian users before backing down and striking multiple deals worth millions of dollars with media companies.
"We are not going to let big tech companies take a free ride on our free press," Mr Morrison said.
"Holding these companies to account shows the strength of resolve of our government to stand up for the things that are important to Australia."
The prime minister likened the media bargaining code to a tax crackdown on multinational companies that sparked a protest from Amazon.
"They left in protest and they came crawling back because our government held its ground," he told parliament.
Mr Morrison said all countries needed to stand up to the online behemoths on making sure governments' actions were respected.
"Big tech companies may be changing the world but they shouldn't run it," he said.
Facebook has agreed to reverse its Australian news ban after securing last-minute amendments to the media bargaining code.
The code will no longer automatically apply and digital platforms will be given more time to negotiate payment with media organisations.
Treasurer Josh Frydenberg said negotiations with the social media giant were always bound to be complex and difficult.
"We saw the market power of digital giants like Facebook when they pretty much blacked-out the Australian news media business from their platform just last week," he told Sky News.
"That was a wake-up call for the whole world, really."
Facebook signed an in-principle agreement with Seven West Media after the government agreed to change its landmark code.
Communications Minister Paul Fletcher expects other media companies will follow suit.
The journalists' union fears small publishers could be shut out of commercial arrangements with Facebook and Google if the internet giants skirt around the code by signing individual deals with big media companies.
"We now face the strange possibility that the code could be passed by parliament and it applies to precisely no one," Media, Entertainment and Arts Alliance federal president Marcus Strom said.
"It will just sit in the treasurer's draw as a threat to misbehaving digital companies."
Google has announced a series of deals with major publishers in recent weeks, including News Corp, Nine Entertainment, Guardian Australia and Seven West Media.
As Facebook also eyes the major media players, Mr Fletcher is hopeful the network will consider smaller regional outlets.
"The news media bargaining code includes a mechanism for the digital platforms to make a default offer to smaller and regional players," he told the ABC.
Labor has backed the amendments to the media bargaining code, assuring its passage through parliament.