WASHINGTON — Chelsea Manning, the former Army intelligence analyst who provided archives of secret military documents to WikiLeaks in 2010, was taken into custody on Friday after a federal judge found her in contempt for refusing to testify before a grand jury that is investigating the antisecrecy group.
Judge Claude H. Hilton of Federal District Court in the Eastern District of Virginia ruled that Ms. Manning must stay in civil detention until she testifies.
“Chelsea is a tremendously courageous person and this outcome was not unexpected but this an appealable order,” said her lawyer, Moira Meltzer-Cohen.
“In solidarity with many activists facing the odds, I will stand by my principles,” she said on Thursday. “I will exhaust every legal remedy available. My legal team continues to challenge the secrecy of these proceedings, and I am prepared to face the consequences of my refusal.”
The case is part of a long-running criminal inquiry into WikiLeaks and its leader, Julian Assange, that dates to the Obama administration and which the Trump administration revived. Ms. Manning said on Thursday that prosecutors on Wednesday had asked her a series of questions about WikiLeaks before the grand jury, but she had responded to every question by saying it violated her constitutional rights.
Mr. Assange has been living for years in the Ecuadorean Embassy in London to avoid arrest. Prosecutors charged him under seal last summer, a fact they inadvertently revealed in a court filing in November.
The precise charge against him remains murky, but trying to convict him of a crime for publishing classified information he received from someone else would raise novel and profound First Amendment issues. The Obama administration had decided against trying to charge him because of fears that establishing a precedent that his actions were a crime could chill investigative journalism.
During her court-martial in 2013, Ms. Manning had admitted sending WikiLeaks large archives of secret documents. Her bulk disclosure vaulted the group and Mr. Assange to global fame years before WikiLeaks gained a different type of notoriety for publishing stolen Democratic emails that Russian hackers had stolen during the 2016 presidential campaign.
In a lengthy confession in 2013, Ms. Manning said she had interacted online with someone who was likely Mr. Assange. But she said she acted of her own accord and was not directed by anyone at WikiLeaks.
A military judge had sentenced Ms. Manning to 35 years in prison, and she served about seven in military custody — by far the longest prison time any American has served for leaking government secrets to the public — before President Barack Obama commuted the remainder of her sentence in 2017. As a transgender person struggling to transition to life as a woman, she had a difficult time in a male military prison and twice tried to commit suicide in 2016.
The contempt hearing on Friday was partly closed, but the judge had opened it for a portion in which Ms. Meltzer-Cohen argued that Ms. Manning should be confined at home. The judge rejected that request and Ms. Manning was taken to the women’s wing of the federal detention center in Alexandria, Va., Ms. Meltzer-Cohen said.
Joshua Stueve, a spokesman for the United States attorney in the Eastern District of Virginia, said federal officials had taken steps to ensure that Ms. Manning’s medical needs would be met while she remains in custody. He also relayed a statement Tracy Doherty-McCormick, a federal prosecutor, had made during the open-court portion of the hearing.
“The government does not want to confine Ms. Manning,” Ms. Doherty-McCormick said. “It has always been our intent and hope for her to testify and comply with the valid court order and valid grand jury investigation. Ms. Manning could change her mind right now and do so. It is her choice. This is a rule of law issue, and Ms. Manning is not above the law.”
Confinement for defying a grand-jury subpoena can last until the term of the jury is over, after which prosecutors would have to obtain a new subpoena and start the process over if they wanted to continue to press the issue. Both Ms. Meltzer-Cohen and Mr. Stueve declined to say when the current jury’s term is set to end.