STORY: Elon Musk lashed out at Australia's prime minister on Tuesday.

That's after a court ordered his social media company X to take down footage of an alleged terrorist attack in Sydney.

The ruling, Musk said on X, meant that any country could control quote "the entire internet."

The post came after an overnight hearing in which Australia's Federal Court ordered X to temporarily hide videos of the incident a week earlier, in which a teenager was charged with terrorism for knifing an Assyrian priest and others.

X said it had already blocked the posts from Australian users, but Australia's e-Safety Commissioner had said the content should be taken down since it showed explicit violence.

Although Musk wrote in another post that X had made the attack footage "inaccessible to Australian IP addresses," a Reuters reporter in Australia was able to view the video.

Australian Prime Minister Anthony Albanese hit back at Musk hours later.

"Well, this guy is showing his arrogance. He's a billionaire over there in the United States who thinks he's above Australian law."

"This isn't about censorship. It's about common sense and common decency. And Elon Musk should show some."

The standoff is the most recent front in the battle between the world's largest internet platforms and countries and nonprofits seeking more oversight of the content hosted on them.

Last month, a U.S. judge threw out a lawsuit by X against a hate speech watchdog.

In Australia, the e-Safety Commissioner fined X last year for failing to cooperate with a probe on anti-child abuse practices- which X is currently fighting in court.

Spokespeople for X and the e-Safety Commissioner were not immediately available for comment.