Chelsea Manning, the former Army intelligence analyst who was convicted for leaking classified information to WikiLeaks, was thrown in jail Friday for refusing to testify to a grand jury investigating the group.

Manning was taken into custody on contempt charges following a brief hearing in which she informed Virginia federal Judge Claude Hilton that she had no intention of testifying.

Saying she objected to the secrecy behind grand jury proceedings, Manning told the judge she “will accept whatever you bring upon me.” She also said she told everything she knows to her court-martial.

Hilton said Manning would remain behind bars until she agrees to testify or the grand jury wraps up the case — which Manning said concerned WikiLeaks’ publication of more than 700,000 classified documents related to the wars in Iraq and Afghanistan that she gave the group in 2010.

On Wednesday, Manning asserted her constitutional right to refuse to answer questions — even after she was offered immunity.

Hilton’s move came as no surprise to Manning, who is transgender and was sent to prison for 35 years for the leak before the sentence was commuted by President Barack Obama in 2017.

“A judge will consider the legal grounds for my refusal to answer questions in front of a grand jury. The court may find me in contempt and order me to jail,” she tweeted Thursday afternoon. “In solidarity with many activists facing the odds, I will stand by my principles. 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.”

With Post wires