A US federal judge on Thursday ordered that former US soldier and WikiLeaks source Chelsea Manning should be immediately released from prison, where she was being held for refusing to testify in an ongoing US investigation of WikiLeaks.

Ms Manning has been held since May for refusing to testify to a grand jury.

In an entry in the US district court docket in Alexandria, Virginia, Judge Anthony Trenga ordered the release of the former army intelligence analyst after prosecutors reported that the grand jury that subpoenaed her has disbanded.

The judge left in place more than $250,000 in fines he imposed for her refusal to testify to the grand jury

Ms Manning had argued that she had shown she could not be coerced into testifying and therefore should be released. On Wednesday, her lawyers said she had attempted to take her own life while at the jail in Alexandria.

A detention hearing for Ms Manning scheduled for Friday was also cancelled. – Reuters/AP