The archives that Ms. Manning provided to WikiLeaks in 2010, when she was an Army intelligence analyst posted in Iraq, helped vault the antisecrecy organization and Mr. Assange to global fame. The events took place years before their image and actions evolved with the publication of Democratic emails stolen by Russian hackers during the 2016 election.

Ms. Manning admitted sending the files to WikiLeaks in a court-martial trial. She also confessed to interacting online with someone who was probably Mr. Assange, but she said she had acted on principle and was not working for WikiLeaks.

Testimony showed that she had been deteriorating, mentally and emotionally, during the period when she downloaded the documents and sent them to WikiLeaks. Then known as Pfc. Bradley Manning, she was struggling with gender dysphoria under conditions of extraordinary stress and isolation while deployed to the Iraq war zone.

She was sentenced to 35 years in prison — the longest sentence by far in an American leak case. After her conviction, she changed her name to Chelsea and announced that she wanted to undergo gender transition, but was housed in a male military prison and twice tried to commit suicide in 2016.

In January 2017, President Barack Obama commuted most of the remainder of her sentence shortly before he left office. But she was swept back up into legal trouble last year when prosecutors investigating Mr. Assange subpoenaed her to testify before a grand jury about their interactions.

Although prosecutors granted immunity for her testimony, Ms. Manning had vowed not to cooperate in the investigation, saying she had ethical objections, and she was placed in civil detention for contempt of court.

Separately last year, the Justice Department unsealed criminal charges against Mr. Assange, who was living in the Ecuadorean Embassy in London. Prosecutors initially charged him with a narrow hacking conspiracy offense, accusing him of agreeing to try to help Ms. Manning crack a password that would have let her log onto a military computer system under a different user account, covering her tracks.