Chelsea Manning, the former Army intelligence analyst who provided secret military documents to WikiLeaks in 2010, was released from jail Thursday after being held for two months for refusing to testify before a grand jury investigating the online leak-publishing organization.
Ms. Manning’s release came on the day that the term of the grand jury that served her with a subpoena in January expired and the grand jurors were dismissed, said Moira Meltzer-Cohen, her lawyer. Ms. Manning, 31, was held for 62 days.
But she may return to jail as early as next week. Her lawyer said Ms. Manning was served with a new subpoena on Wednesday to appear before a different grand jury on May 16, where she is expected to be asked “the same questions” about WikiLeaks. Ms. Manning will appear before the new grand jury but will not answer its questions, her lawyer said.
Prosecutors had granted immunity to Ms. Manning for her testimony, but when she appeared before the grand jury in March she responded to each question by saying that it violated her constitutional rights. Judge Claude H. Hilton of Federal District Court in the Eastern District of Virginia held her in contempt and ruled at the time that she remain in custody until she testified.
The investigation into WikiLeaks and its leader, Julian Assange, is part of a long-running criminal inquiry that began during the Obama administration and has continued under President Trump.
Mr. Assange evaded the investigation for seven years by holing up in Ecuador’s embassy in Britain, where he continued his activities with WikiLeaks. That included working on the release of thousands of Democratic emails stolen by Russian hackers during the 2016 presidential campaign.
But over time Mr. Assange wore out his welcome. Ecuador suspended the citizenship it had granted him and kicked him out of the embassy last month. He was quickly arrested to face allegations in the United States that he conspired to hack into a Pentagon computer network in 2010.
During her court-martial in 2013, Ms. Manning admitted sending secret documents to WikiLeaks: 250,000 American diplomatic cables and roughly 480,000 Army reports from the wars in Afghanistan and Iraq.
She also confessed to interacting online with someone who was probably Mr. Assange. But she said she had acted on her own, out of principle, and was not working for WikiLeaks. In March, she said prosecutors wanted to question her about that period once again.
“The grand jury’s questions pertained to disclosures from nine years ago and took place six years after an in-depth computer forensics case, in which I testified for almost a full day about these events,” she said in a statement at the time. “I stand by my previous public testimony.”
In 2013, a military judge sentenced Ms. Manning to 35 years in prison. She served seven years, including pretrial custody, by the time President Barack Obama commuted the remainder of her sentence in 2017. It was the longest amount of time that any American had served in prison for leaking government secrets to the public.
Ms. Manning, a transgender woman, became a cause célèbre for free speech advocates and for gay and transgender activists while she was in prison. She was known as Bradley at the time of her conviction and transitioned to life as a woman while incarcerated in a prison for men.