WASHINGTON — Federal prosecutors filed criminal charges against WikiLeaks founder Julian Assange in late 2017, more than two months earlier than disclosed in the indictment when he was arrested last week, court documents released Monday revealed.

Assange was taken into custody April 11 after spending more than six years under the protection of Ecuador's embassy in London. A federal indictment unsealed after his arrest accused him of trying to help a U.S. Army private crack an encrypted password to hack into a Pentagon computer and steal classified documents.

But charges for the same offense were actually filed in secret on Dec. 21, 2017, in federal court in Alexandria, Virginia. The 26-page affidavit accompanying the charges listed what it said were hundreds of online exchanges between Assange and the Army private, Chelsea Manning, who provided hundreds of thousands of government documents, many of them classified, to WikiLeaks.

After one transmission of documents, the charges said, Manning messaged, "thats all i really have got left." When Assange suggested getting more, Manning replied, "ive already exposed quite a bit, just no-one knows yet. ill slip into darkness for a few years, let the heat die down," according to the newly unsealed court filing.

Manning was arrested two months later while on duty in Iraq.

Despite filing the criminal charges, the Department of Justice sought a grand jury indictment only a few months later in order to make a stronger case for extradition in the event Assange was arrested, an administration official said Monday.

The Obama Justice Department had concluded that Assange was, for legal purposes, a journalist and that charging him for gathering and disseminating government secrets would be no different than prosecuting an American news organization for the same conduct. A former Obama administration official said last week that the United States had not considered bringing the kind of computer hacking charges that were later filed against Assange.

But the Trump administration took a different view and began exploring other ways to seek Assange's prosecution. As early as April 2017, Jeff Sessions, then the attorney general, said arresting Assange was a priority. The Trump administration's first CIA director, Mike Pompeo, called WikiLeaks "a nonstate hostile intelligence service."

Ecuador's foreign minister, Jose Valencia, said Monday that it was not unfairly targeting Assange when it revoked his political asylum last week, calling his behavior "undeserving, disrespectful." Valencia said his country had made a sovereign decision to revoke Assange's asylum over concerns about possible computer hacking in Ecuador.