Chelsea Manning, the former US army analyst turned whistleblower, was arrested on Friday after she refused to testify before a federal grand jury on matters relating to her 2010 disclosure to WikiLeaks, multiple news outlets reported.

A judge ruled that Manning would be jailed until the grand jury's proceedings are over or until she decided to testify, holding her in contempt of court.

Manning was previously imprisoned for seven years in relation to her WikiLeaks disclosures. Her 35-year sentence was cut short after President Barack Obama granted her clemency.

Manning was vocal about her struggles in prison, where she attempted suicide twice and underwent a gender transition despite being continually held in a men's prison.

Chelsea Manning, the former US army analyst and whistleblower who leaked troves of classified material to WikiLeaks in 2010, was arrested on Friday after she reportedly refused to testify in front of a Virginia grand jury about her interactions with WikiLeaks and its founder, Julian Assange.

"I've found you in contempt," Judge Claude M. Hilton told Manning at the public ruling, according to The Washington Post. He said Manning will be jailed "either until you purge yourself or the end of the life of the grand jury."

Manning said in a statement on Twitter that she had been summoned to appear before a secret grand jury on Wednesday. In response to each question, she said she answered, "I object to the question and refuse to answer on the grounds that the question is in violation of my First, Fourth, and Sixth Amendment, and other statutory rights."

"All of the substantive questions pertained to my disclosures of information to the public in 2010 — answers I provided in extensive testimony, during my court-martial in 2013," her statement continued.

In January, WikiLeaks said federal prosecutors were working to get witnesses to testify against Assange in secret criminal proceedings being conducted by the Trump administration.

Read more: US prosecutors press witnesses to testify against Assange: WikiLeaks

Before the ruling, Manning told reporters, "I don't believe in the grand jury process; I don't believe in the secrecy of this."

Manning's lawyer, Moira Meltzer-Cohen, called the arrest an "an act of tremendous cruelty," according to The Post.

Manning was imprisoned for seven years out of a 35-year sentence stemming from multiple counts under the Espionage Act. In 2017, she was released after President Barack Obama commuted her sentence.

Manning has said she suffered from mental-health problems in prison, where she attempted to commit suicide twice. During her incarceration, she spoke out about her treatment in the justice system as a transgender woman.

Throughout her sentence, she was housed in a men's prison despite undergoing hormone and speech therapy as part of her transition.

Meltzer-Cohen commended prosecutors in the current case for working to address Manning's medical needs, and Hilton said the court was available if US Marshals failed to address them, according to The Post.