Following a dramatic hearing at a federal district court in Eastern Virginia, activist and former military prisoner Chelsea Manning was jailed by a judge for contempt of court after refusing to testify to a grand jury empaneled in the government's long running criminal investigation into Wikileaks and its founder, Julian Assange.

The judge, the Hon. Claude H. Hilton, ruled that Manning must remain in civil detention until she testifies, her lawyer Moira Meltzer-Cohen told the New York Times.

Manning was subpoeaned in January to testify before the jury. But she vowed not to cooperate even though prosecutors offered immunity for her testimony.

"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."

Manning's jailing offers another glimpse into the government's secretive investigation into Wikileaks, which was started under the Obama Administration and picked up by the Trump Administration. Manning served seven years in prison for leaking the infamous "collateral murder" tape to Wikileaks, by far the longest prison term ever served for leaking government secrets. Manning, who transitioned to a woman during her time in prison, twice tried to commit suicide before she was pardoned by Obama.

Late last year, an accidental leak of some information in the case revealed that Assange had been charged under seal last summer. And while Manning has decided to refuse to cooperate, a Wikileaks volunteer recently agreed to testify against Assange in exchange for immunity. The grand jury has been investigating Assange for nine years.

In a statement released earlier this week, Manning said she was ready to "face the consequences" of her refusal to answer questions before the jury. Manning had appeared before the grand jury on Wednesday, and also refused to answer questions, according to NBC and her statement.

"I responded to each question with the following statement: ‘I object to the question and refuse to answer on the grounds that the question is in violation of my First, Fourth, and Sixth Amendment, and other statutory rights," Manning said in a statement. "All of the substantive questions pertained to my disclosures of information to the public in 2010 — answers I provided in extensive testimony, during my court-martial in 2013," the statement said.

Manning has already admitted to sending Wikileaks an archive of secret documents while working as a military intelligence analyst, and she told the court that everything she would be willing to disclose has already been revealed during her court martial hearing back in 2013.

Chelsea Resists, a group supporting her, has published a statement about her imprisonment.

** Chelsea was taken into custody today for resisting a grand jury in the Eastern District of Virginia



Chelsea provided the following statement: pic.twitter.com/tWjEOFyhYn — Chelsea E. Manning (@xychelsea) March 8, 2019

And, as one twitter wit suggested, now would be an interesting time to be a fly on the wall in the Alexandria jail.

Raise your hand if you thought that the Alexandria jail would hold Maria Butina, Paul Manafort, and Chelsea Manning, all at the same time. https://t.co/jVKrRkRwXa — emptywheel (@emptywheel) March 8, 2019

While the ruling is appealable, it's unclear if or when Manning might be released.