Australia's leader has called Elon Musk an "arrogant billionaire" in an escalating feud over X's reluctance to remove footage of a church stabbing.
X previously said it would comply "pending a legal challenge".
Prime Minister Anthony Albanese's criticism followed Mr Musk using a meme to accuse his government of censorship.
On Tuesday, Mr Albanese told ABC News that Mr Musk "thinks he's above the law but also above common decency".
I find it extraordinary that X chose not to comply and are trying to argue their case," Mr Albanese told a press briefing.
In a subsequent series of online posts, Mr Musk wrote: "I'd like to take a moment to thank the PM for informing the public that this platform is the only truthful one." Another depicted a Wizard of Oz-style path to "freedom" leading to an X logo.
Earlier, he also criticised eSafety Commissioner Julie Inman Grant personally, describing her as the "Australian censorship commissar".
Mr Albanese defended Ms Inman Grant, saying she was protecting Australians.
"Social media needs to have social responsibility with it. Mr Musk is not showing any," he said.
The platform will have 24 hours to comply with Monday evening's injunction, with a further hearing into the matter expected in the coming days.
X and the eSafety Commissioner are already involved in legal proceedings over the platform's alleged failure to provide information over how it tracks and removes child abuse material online.
Last week Australia's eSafety Commissioner, an independent regulator, threatened X and other social media companies with hefty fines if they did not remove videos of the stabbing at the Assyrian Christ the Good Shepherd church, which police have called a terror attack.
X agreed to geo-block the videos in Australia but has argued against restricting access for its global users.