An Australian court ordered Google to pay A$715,000 (US$515,000) to a former senior lawmaker on Monday after finding that a YouTube commentator’s “relentless, racist, vilificatory, abusive and defamatory campaign” drove him to quit politics prematurely.

The Federal Court found that Alphabet Inc’s Google, which owns content-sharing website YouTube, earned thousands of dollars by hosting two videos attacking the deputy premier of Australia’s most populous state New South Wales that were viewed nearly 800,000 times between them since being posted in late 2020.

The videos by political commentator Jordan Shanks questioned the integrity of the lawmaker, John Barilaro, including labeling him “corrupt” without evidence, and called him racist names that were “nothing less than hate speech,” the judge, Steve Rares, told the court.

Story continues below advertisement

When Barilaro quit politics in October 2021, it was because he “was traumatized by Google’s and Mr Shanks’ campaign and ... it caused him to leave public office prematurely,” said Rares.

“I found Google’s conduct in this proceeding to be improper and unjustifiable.”

A Google spokesperson was not immediately available for comment.

A spokesperson for Shanks, who was a co-defendant with Google until he and Barilaro reached a settlement last year, was not immediately available for comment.

Story continues below advertisement

Be smart with your money. Get the latest investing insights delivered right to your inbox three times a week, with the Globe Investor newsletter. Sign up today.