Former Army intelligence analyst Chelsea Manning tried to “take her own life” in a Virginia jail on Wednesday ahead of a looming court date, her legal team said in a statement.

She has been recovering and is still expected to appear in court for a hearing Friday after refusing to testify before a grand jury in a WikiLeaks probe, the attorneys said.

Manning was re-arrested last May for failing to comply with the subpoena to testify after serving two months for the same issue.

A judge is set to rule Friday on a motion to terminate the civil contempt sanctions stemming from her May refusal.

She told the judge in May she’d “rather starve to death” than comply with the subpoena.

“In spite of those sanctions -- which have so far included over a year of so-called 'coercive' incarceration and nearly half a million dollars in threatened fines -- she remains unwavering in her refusal to participate in a secret grand jury process that she sees as highly susceptible to abuse,” her legal team wrote in a statement.

CHELSEA MANNING: TRUMP ADMINISTRATION 'CLEARLY' WANTS TO GO AFTER JOURNALISTS 

In a 2019 letter to the judge, Manning called the grand-jury probe “an effort to frighten journalists and publishers, who serve a public good.”

Manning was found guilty of espionage and theft in 2013 and was sentenced to 35 years in prison after she leaked classified documents to Wikileaks.

CLICK HERE TO GET THE FOX NEWS APP

U.S. officials claimed the website’s founder, Julian Assange, worked in tandem with Manning to break into a classified government computer and leak information related to U.S. war and diplomacy efforts.

Then-President Obama commuted her sentence in 2017 and she was released from prison after seven years.