Former Army intelligence analyst Chelsea Manning has been released from the Alexandria, Va., jail where she was held after refusing to testify in the grand jury investigation of WikiLeaks founder Julian Assange, her lawyers said.

She was released because that grand jury has expired. She has been subpoenaed to appear before a new grand jury on May 16 and may be returned to jail if she again refuses to testify, her support team said in a statement.

“Chelsea will continue to refuse to answer questions, and will use every available legal defense to prove . . . that she has just cause for her refusal to give testimony,” the statement read.

A spokesman with the U.S. Attorney’s Office in the Eastern District of Virginia declined to comment.

Manning shared hundreds of thousands of classified government documents with WikiLeaks in 2010, while serving as an Army intelligence analyst in Iraq. ­Assange, currently jailed in London after seven years in asylum at Ecuador’s British embassy, is accused of conspiring to help Manning break a password that would allow anonymous access to a Defense Department computer.

Manning was initially subpoenaed in January to come before a grand jury but has refused to appear, rejecting an offer of immunity from prosecution in both military and federal court. She was jailed for civil contempt of court in March.

While she failed to quash the subpoena, Manning filed an affidavit this week saying she will never cooperate and, therefore, further incarceration is pointless.

“The idea I hold the keys to my own cell is an absurd one, as I face the prospect of suffering either way due to this unnecessary and punitive subpoena: I can either go to jail or betray my principles,” she said in a letter to the court. “The latter exists as a much worse prison than the government can construct.”

She added, as she has before, that she does not believe anything she would say would “provide any value to an investigation.”

Court filings indicate prosecutors believe Manning has offered inconsistent information regarding her relationship with Assange. In a criminal complaint unsealed in April, they note that she claimed in military court that she was never sure if she was speaking directly to the WikiLeaks founder. But in conversations with the hacker who turned her in to authorities, she said she had confirmed Assange’s identity, according to court papers.

Civil contempt is meant to be coercive rather than punitive. Manning’s attorneys previously noted that other grand jury resisters have been freed from jail on the grounds that their incarcerations had become punitive.

“Whatever one may make of her beliefs, it is evident that they are well-developed, robust, and sincerely held,” her attorney Moira Meltzer-Cohen wrote the court. “It is inconceivable that Chelsea Manning will ever change her mind.”

Doing so, Meltzer-Cohen added, would damage Manning’s reputation among the activists who supported her both in her initial disclosure of diplomatic and military secrets and in her opposition to the grand jury system.

Manning was convicted at a court-martial in 2013 of crimes related to her disclosures and sentenced to 35 years in prison, but she was released by President Obama after seven years in custody.

An earlier version of this story incorrectly said Manning was an intelligence officer. She was an intelligence analyst.