Australia said Friday it will introduce legislation to make Facebook Inc. and Alphabet Inc.'s Google pay media companies for news content, in what is regarded as the first such move in the world.

The announcement comes after the Australian Competition and Consumer Commission released earlier in the day a draft mandatory code of conduct that outlines how the tech companies would pay traditional news media companies for their content.

Treasurer Josh Frydenberg said the mandatory code seeks to create a "level playing field" that ensures "a fair go for Australian news media businesses."

"We want Google and Facebook to continue to provide these services to the Australian community, which are so much loved and used by Australians," he said. "But we want it to be on our terms."

Frydenberg did not say how many tech companies would be subject to the code except that it "will start with Google and Facebook."

Legislation for the code is expected to be introduced to parliament later this year, following a consultation period.

The draft code outlines bargaining arrangements between tech companies and commercial media outlets to determine an agreed-upon payment, as well as minimum standards relating to the presentation of news and a penalty regime for companies that breach the code.

If a pricing agreement cannot be reached after three months, arbitrators will make a binding decision.

Australian media companies have experienced a sharp decline in advertising revenue since the coronavirus pandemic hit, causing multiple newspapers and magazines to either shut down or switch to online-only publication.