Chelsea Manning spent 7 years in military prisons for leaking US secrets to WikiLeaks in 2010. (File)

Former US military intelligence analyst Chelsea Manning was ordered back to jail on Thursday for refusing to testify before a grand jury believed to be investigating WikiLeaks founder Julian Assange.

Andy Stepanian, a spokesman for Manning's legal team, said she had been remanded in custody by Judge Anthony Trenga for contempt of court after again refusing to provide testimony.

Manning, who spent seven years in military prisons for leaking US secrets to WikiLeaks in 2010 and then two more months in an Alexandria, Virginia, jail this year on contempt charges, had said before the hearing that she would again refuse to testify.

"I'm not going to comply with this grand jury," she told journalists outside the Alexandria courthouse before the hearing.

According to The Washington Post, US District Court Judge Trenga sent Manning back to jail.

He ordered a fine of $500 a day if she does not testify within 30 days, raising that to $1,000 a day if she does not testify within 60 days.

The newspaper quoted Manning as saying "the government cannot build a prison bad enough, cannot create a system worse than the idea that I would ever change my principles.

"I would rather starve to death than to change my opinions in this regard," she said. "I mean that quite literally."

The judge, the Post said, responded by telling Manning "There's nothing dishonorable in discharging your responsibility as a US citizen."

Manning has accused the government of seeking to revive her original court martial case, saying prosecutors were unhappy over her 2017 pardon by president Barack Obama.

"The goal here is really to relitigate the court martial," Manning said before the hearing. "They didn't like the outcome -- I got out."

Manning, 31, was called early this year to testify to a grand jury -- a panel investigating major crimes that operates in secrecy -- about her work with Assange and WikiLeaks nine years ago.

She said the government was abusing the grand jury process and refused to testify, saying she had answered all the questions years before anyway.

A judge found her in contempt and on March 8 she was jailed indefinitely.

She was released last week when the grand jury's mandate expired, and was called to testify before a new one on Thursday which she said was seeking answers to the same set of questions.

While she was not at liberty to discuss the specifics of the investigation, she indicated that it also was a probe of Assange and WikiLeaks' actions in 2010.

The US Justice Department has asked Britain to extradite Assange to stand trial in the United States for "conspiracy" for advising Manning on breaking into a restricted US government computer.

Assange, now committed to a British prison for a year and also facing an extradition effort from Sweden, asserts that he is a journalist with the right to publish purloined secrets.

Manning, a transgender woman whom supporters call a whistleblower, said the new grand jury case is meaningless since the Justice Department already unveiled its charges against Assange.

"The case doesn't make sense, it's very bananas," she said.

"Ultimately this is an attempt to place me back into confinement."