Virginia federal judge Anthony Trenga ordered the release of Chelsea Manning on Thursday after almost a year of confinement. The judge was holding Manning in contempt for refusing to testify before a grand jury about matters related to Wikileaks founder Julian Assange. But now that the grand jury has wrapped up its work, there's no longer a legal basis to hold Manning.

In 2010, Manning was an army private with access to some of the US military's classified networks. Concerned about the conduct of America's wars in the Middle East, Manning leaked a vast trove of classified military documents to Wikileaks, hoping to spark a national debate.

But the US government quickly identified Manning and tried her before a military court. In 2013, she was sentenced to 35 years in prison. But just before leaving office in 2017, President Obama commuted Manning's sentence, allowing her to go free years early.

But her conflict with the US government wasn't over. In 2019, federal prosecutors called her to testify before a grand jury as the government built its case against Assange. Manning—not known for her compromising spirit—flatly refused to testify. So the judge sent her to jail for contempt.

This actually happened twice. She was held in contempt before one grand jury in March 2019. When the grand jury's term expired in May, she was released. But her freedom only lasted a week before the feds convened another grand jury and called Manning again. Once again, she refused to testify, so the judge held her in contempt. The latest confinement lasted until this week, when the grand jury wrapped up its business.

Manning has taken a hard line here because she doesn't believe that the secretive grand jury process—which prosecutors use to obtain indictments against defendants—is legitimate.

In addition to serving jail time, Manning also faces stiff fines. She was ordered to pay the court as much as $1,000 per day for refusing to testify. Over the course of almost a year, those fines have added up to more than $250,000. Manning's lawyers have said she is effectively broke and has no realistic prospect of paying that large figure.