But free speech campaigners say the policy would require all users to submit to ID checks to use social media platforms, which would compromise the anonymity of users.

Sarah Rogers, Donald Trump’s free speech tsar, has previously accused the UK Government of being “hostile to freedom of speech” and compared Britain to Russia and Iran after Sir Keir’s threat to ban X if it did not restrict the creation of “deepfake” AI-generated pornographic images.

However, the latest intervention is the first time the US has submitted a formal objection to Sir Keir’s plans. It was made in a 1,200-word response to his consultation on “growing up in the online world”, which closed on Friday.

The Telegraph understands the submission was made the previous week, in late May, amid speculation that ministers were preparing to announce a ban as soon as the request for views from the public closed.

Foreign governments rarely submit their opinions on Britain’s domestic policy via public consultations, preferring to talk privately about them via diplomatic channels.

In its response, the US warned: “The best answer to challenges posed by technology is almost always better technology, not broad bans or blunt regulatory instruments.

“Most content should remain accessible by default, including political speech.  We believe an open internet is essential to the preservation of free speech and most content should be accessible by default unless the provider knows or has reason to know the user is a child.

“We have concerns about regulations that impose disproportionate compliance burdens on American companies or that apply to one platform but not similar services.”