A “copy and paste error” inadvertently revealed Friday that WikiLeaks founder Julian Assange has been charged under seal by the Justice Department with unspecified offenses.

A court filing on an unrelated case, submitted by assistant U.S. attorney Kellen Dwyer in the Eastern District of Virginia — where many national security matters are dealt with — said that “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.”

The filing went on to say: “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 prosecutor’s office admitted the mistake. “The court filing was made in error. That was not the intended name for this filing,” Joshua Stueve, a spokesman for the office said.

The Washington Post confirmed that Assange had indeed been charged.

Wikileaks said Friday it has not been contacted by Dwyer’s office, and the “apparent cut-and-paste error in an unrelated case also at the Eastern District of Virginia” revealed the “existence of sealed charges (or a draft for them) against WikiLeaks' publisher Julian Assange.”

What the filing did not reveal is what charges Assange now faces. Sources speaking to the Wall Street Journal said prosecutors could use the Espionage Act, which criminalizes the disclosure of national defense-related information.

Speaking to Kremlin mouthpiece Sputnik, Assange’s Ecuadorean lawyer Carlos Poveda claims the U.S., U.K., and Ecuador had reached an agreement over his client.

Poveda said Washington was planning to impose “grave” charges against Assange. “It will not be a death penalty but he may get a life sentence,” he said.

The Justice Department has long been investigating Assange and WikiLeaks over its 2010 publication of thousands of classified cables related to the Afghanistan war. Investigations into the activist gained new impetus after the publication of thousands of leaked Democratic emails in the run-up to the 2016 election.

A recent indictment by special counsel Robert Mueller portrayed WikiLeaks as a tool of the Kremlin, publishing Democratic emails U.S. intelligence agencies believe were hacked by Russia operatives.

Mueller has also probed communications between Assange and associates of President Donald Trump, including political operative Roger Stone and commentator and conspiracy theorist Jerome Corsi.

“The news that criminal charges have apparently been filed against Mr. Assange is even more troubling than the haphazard manner in which that information has been revealed,” Barry Pollack, one of Assange’s lawyers, told the Guardian.

Assange has been living in the Ecuadorian embassy in London since September 2012 but his relationship with his hosts has deteriorated significantly in the recent months. The country’s new president Lenin Moreno recently describing Assange as a “stone in our shoe.”

Assange sued Ecuador last month over the conditions of his confinement — he recently had his internet access disconnected — but an Ecuadorian judge rejected the claims. At the hearing, Assange said he expected to be forced out of the embassy soon.

The U.S. has been investigating Assange and WikiLeaks since 2010 when Chelsea Manning leaked classified cables related to the Afghanistan War. While Manning was imprisoned — and subsequently pardoned — for her part in the leak, no charges have ever been brought against Assange.

Assange and WikiLeaks have consistently said that they deserve protection under the First Amendment. During the Obama administration, then-Attorney General Eric Holder argued that WikiLeaks did not deserve the same protections as news organizations, but charges were never brought.

But not everyone agrees with this assessment.

“[It is] deeply troubling if the Trump administration, which has shown little regard for media freedom, would charge Assange for receiving from a government official and publishing classified information — exactly what journalists do all the time,” Kenneth Roth, the executive director of Human Rights Watch, said Friday morning.

Any prosecution of Assange for publishing would be "unprecedented and unconstitutional" according to Ben Wizner, from the American Civil Liberties' Union (ACLU), adding that it could open the door to charges being filed against other media organizations.

"Prosecuting a foreign publisher for violating U.S. secrecy laws would set an especially dangerous precedent for U.S. journalists, who routinely violate foreign secrecy laws to deliver information vital to the public's interest," Wizner told VICE News in an emailed statement.