The Wikileaks founder Julian Assange has been charged under seal with unspecified offences in the US, prosecutors have accidentally revealed in an unintentional court filing.

Federal prosecutors had hoped to keep the indictment prepared against Mr Assange a secret “due to the sophistication of the defendant, and the publicity surrounding the case”, and so that Mr Assange would “no longer evade or avoid arrest and extradition in this matter”.

Wikileaks said on social media that the US Justice Department had “accidentally revealed existence of sealed charges (or draft of them) against [Mr Assange] in apparent cut-and-paste error”.

The document that reveals the charges, which prosecutors say was filed by mistake, asks a judge to seal documents in a criminal case unrelated to Mr Assange, and carries markings indicating it was originally filed in a US District Court in Alexandria, Virginia in August.

A source familiar with the matter told Reuters news agency the document was initially sealed but unsealed this week for reasons that are unclear at the moment.

And Joshua Stueve, a spokesman for the prosecutors’ office which filed the document that was unsealed, told Reuters: ”The court filing was made in error. That was not the intended name for this filing.”

According to the document, any procedure “short of sealing, will not adequately protect the needs of law enforcement at this time because, due to the sophistication of the defendant, and the publicity surrounding the case, no other procedure is likely to keep confidential the fact that Assange has been charged”.

It adds: “The complaint, supporting affidavit, and arrest warrant, as well as this motion and the proposed order, would need to remain sealed until Assange is arrested in connection with the charges in the criminal complaint and can therefore no longer evade or avoid arrest and extradition in this matter.”

The Washington Post reported that the document had been penned by the assistant US attorney Kellen S Dwyer.

US officials have previously acknowledged that federal prosecutors based in Alexandria have been conducting a lengthy criminal investigation into Wikileaks and its founder.

Mr Dwyer had also been assigned to the WikiLeaks case, according to The Washington Post. US media quoted sources familiar with the matter saying that what Mr Dwyer was disclosing was true, but unintentional.

Representatives of the Trump administration, including secretary of state Mike Pompeo, have publicly called for Mr Assange and Wikileaks to be aggressively prosecuted over the 2010 release of classified diplomatic cables.

Prosecutors are reported to have reopened their investigation into whether charges should be brought for the 2010 leak since Donald Trump came to power.

Support free-thinking journalism and attend Independent events

And separately, special counsel Robert Mueller has also looked into WikiLeaks’ publication of emails from the Democratic National Committee and Hillary Clinton’s then-campaign chairman, John Podesta, ahead of the 2016 election.

Officials have previously claimed the emails were hacked by Russian spies and transferred to Wikileaks.

Mr Assange entered the Ecuadorian embassy in London six years ago, to avoid extradition to Sweden to be questioned in a sexual molestation case.

Sweden has since dropped its request to extradite Mr Assange, but he still faces arrest by the Metropolitan Police if he leaves the embassy on a charge of skipping bail.

Mr Assange was initially treated as a welcome guest in the embassy, but his relations with Ecuadorian officials have become strained over time and he has often complained of his living conditions.