SYDNEY—Australia said on Sunday that it would introduce legislation to make social-media companies liable for defamatory comments published on their platforms, in a move that risks exposing tech companies to future lawsuits.

Prime Minister Scott Morrison said the legislation also aims to unmask people who make hurtful comments online by requiring companies such as Meta Platforms Inc.’s Facebook to disclose their details, such as an email address or cellphone number, when a complaint is made.

Social-media...

SYDNEY—Australia said on Sunday that it would introduce legislation to make social-media companies liable for defamatory comments published on their platforms, in a move that risks exposing tech companies to future lawsuits.

Prime Minister Scott Morrison said the legislation also aims to unmask people who make hurtful comments online by requiring companies such as Meta Platforms Inc.’s Facebook to disclose their details, such as an email address or cellphone number, when a complaint is made.

Social-media companies that provide those details when a complaint is made would have a defense from being the publisher of comments on their platforms, he said.

“It is in the social-media companies’ interests to make sure that they have a very voracious way of ensuring that they can actually tell people who this is,” Mr. Morrison said. “Otherwise, they’re the ones who are going to get the case brought against them.”

A spokeswoman for Facebook said the company is waiting to receive more detail from the Australian government on the proposal, declining to comment further.

The proposed legislation comes after Australia’s highest court found in September that news organizations are legally liable for comments on their Facebook pages.

In the September ruling, the High Court of Australia determined that media companies facilitated and encouraged comments from users by creating public Facebook pages and posting content on them. According to the court, media companies are responsible for any defamatory content that appears on their Facebook pages because they are considered publishers of the comments.

The decision of the High Court, Australia’s equivalent to the U.S. Supreme Court, chilled the media industry locally and overseas. CNN restricted access to its Facebook pages in Australia following the ruling, while some legal experts warned it could hinder the ability of media companies to promote important public-interest journalism.

Michael Miller, executive chairman of News Corp

Australia, on Sunday said the government’s proposed legislation is a positive step.

“These are tough new, world-first laws that will give Australian courts the power to order social media giants to identify perpetrators or risk incurring hefty defamation payouts,” Mr. Miller said.

News Corp Australia is a subsidiary of News Corp, which also owns Dow Jones & Co., publisher of The Wall Street Journal.

James Chessell,

managing director, publishing, at Nine Entertainment Co., owner of the Sydney Morning Herald, said, “Nine welcomes the government’s announcement today, which will put responsibility for third party comments made on social media pages with the person who made the comment or with the platforms if the platforms cannot identify the person.”

Australia is considered to be a defamation hot spot because of plaintiff-friendly laws that make it easier to win defamation lawsuits compared with other jurisdictions. In Australia, free speech isn’t protected by the constitution, and a defendant such as a newspaper must prove that a statement is true. In the U.S., where the First Amendment protects freedom of speech, it is the plaintiff’s responsibility to prove an alleged defamatory statement is false.

U.S. law broadly exempts social-media companies like Facebook from legal liability for what people post on the site, though some U.S. politicians have called for changes.

Michaelia Cash,

Australia’s attorney general, outlined two mechanisms for people to raise concerns about comments made online.

One involved the social-media companies putting in place a complaints procedure that could lead to them disclosing details of users alleged to have made derogatory remarks following a complaint by any person who claimed to have been hurt by the remarks.

“In other words, unmask them with either their email address, their mobile phone number or other relevant details to enable that person to take a defamation action against them,” Ms. Cash said.

A second pathway would allow people to ask Australia’s federal court to order social-media companies to tell a user that a complaint has been made against them and that they need to delete the defamatory comments. Complainants could still seek users’ details to bring a defamation claim, she said.

Mr. Morrison said consultation on the proposed legislation would begin, and that it would likely be introduced to Parliament next year.

“The point here is we want the social-media companies to fix this,” Mr. Morrison said. “They have the wit, they have the technology, they have the innovation.”

Write to David Winning at david.winning@wsj.com