Former US army intelligence analyst and Wikileaks source Chelsea Manning has been released from prison.
Manning was remanded for refusing to testify in an inquiry into Wikileaks. She had been held in a detention centre in Virginia since last May.
She was scheduled to appear in court on Friday, but the judge ruled that it was no longer necessary for her to testify.
Manning was found guilty in 2013 of charges including espionage for leaking secret military files to Wikileaks.
She accrued more than $250,000 (£198,000) in fines for refusing to co-operate with the inquiry. Her legal team had asked for these to be vacated, but the judge said they must be paid in full.
Manning, 32, refused to answer further questions about Wikileaks from investigators because she said she had already given her testimony during the 2013 trial.
Her release order on Thursday came shortly after her legal team said she had tried to take her own life and was recovering in hospital.
Police confirmed there was "an incident" involving Manning at the detention centre in Virginia on Wednesday afternoon. "It was handled appropriately by our professional staff and [she] is safe," a police statement said.
Manning leaked hundreds of thousands of secret US military files relating to the Afghan war to Wikileaks in 2010. She was sentenced to 35 years in prison, but former President Barack Obama commuted the rest of her sentence in 2017.
US prosecutors have been investigating Wikileaks for several years.
They are currently seeking the extradition of its co-founder Julian Assange from the UK over his alleged role in the 2010 release of classified military and diplomatic material.