Australia has passed a tough new law that could see big tech executives jailed if their platforms host violent video content.

Attorney General Christian Porter said Thursday that the new penalty regime would target social media firms and clamp down on the circulation of content that broadcasts violent crimes.

It comes after tech giants Facebook, Google and Twitter failed to remove videos of a shooting in a New Zealand mosque last month, where 50 people were killed.

Australia's new legislation makes it a criminal offence for social media platforms not to swiftly remove "abhorrent content."

Executives may be jailed for up to three years if their platforms fail to comply, and companies face fines of up to 10 percent of their annual global turnover.

The law will also require social media firms — regardless of their location — to notify the Australian Federal Police if they become aware that their service is streaming violent conduct that is happening in Australia. Failure to do so will see company executives fined up to 168,000 Australian dollars ($119,300), while corporations face penalties of up to 840,000 Australian dollars.

"The tragedy in Christchurch just over two weeks ago brought this issue to a head," Porter said in a press release Thursday.

"It was clear from our discussions last week with social media companies, particularly Facebook, that there was no recognition of the need for them to act urgently to protect their own users from the horror of the live streaming of the Christchurch massacre and other violent crimes, and so the government has taken action with this legislation."