Those who do not subscribe can still use Grok to edit images on its separate app and website.

“Musk has thrown his toys out of the pram in protest at being held to account for the tsunami of abuse,” said Professor Clare McGlynn, an expert in the legal regulation of pornography, sexual violence and online abuse.

“Instead of taking the responsible steps to ensure Grok could not be used for abusive purposes, it has withdrawn access for the vast majority of users.”

And Hannah Swirsky, head of policy at the Internet Watch Foundation, said it “does not undo the harm which has been done”.

“We do not believe it is good enough to simply limit access to a tool which should never have had the capacity to create the kind of imagery we have seen in recent days,” she said.,

The charity previously said its analysts had discovered “criminal imagery” of girls aged between 11 and 13 which “appeared to have been created” using Grok.

“Sitting and waiting for unsafe products to be abused before taking action is unacceptable,” Swirsky said.

It comes after the government urged regulator Ofcom to use all its powers – up to and including an effective ban – against X over concerns about unlawful AI images created on the site.

Addressing concerns that sexualised images of adults and children had been generated by Grok, Prime Minister Sir Keir Starmer said it was “disgraceful” and “disgusting”.

He said Ofcom had the government’s “full support” to act on the content.

“It’s unlawful. We’re not going to tolerate it. I’ve asked for all options to be on the table,” he said in an interview with Greatest Hits Radio.

Government sources told BBC News: “We would expect Ofcom to use all powers at its disposal in regard to Grok and X.”

Ofcom’s powers under the Online Safety Act include being able to seek a court order to prevent third parties from helping the Elon Musk-owned platform raise money or be accessed in the UK.

The BBC has approached the regulator for comment.