/ Updated 
By Alex Johnson

Former Army intelligence analyst Chelsea Manning ended her prison hunger strike Tuesday and expressed "unending relief" after the Army agreed to provide gender reassignment surgery, her lawyers said Tuesday.

Manning, 28, was sentenced in August 2013 to 35 years behind bars for espionage after she acknowledged having sent classified documents on U.S. military operations in Iraq and Afghanistan to the anti-secrecy website WikiLeaks.

Imprisoned U.S. soldier Chelsea Manning.U.S. Army / US Army - AFP - Getty Images

Manning subsequently changed her name from Bradley to Chelsea, was diagnosed with gender dysphoria and declared her desire to live as a woman.

But the military imprisoned her in the all-male U.S. Disciplinary Barracks at Fort Leavenworth, Kan., although it did begin providing hormone treatment in February 2015 after she sued.

She unsuccessfully attempted suicide in July.

Manning then started a hunger strike five days ago over what she called a lack of treatment for her gender dysphoria. She has asked the government for the past year to allow her to grow her hair long but has been told no, her lawyers say.

On Tuesday, Manning was shown a memo stating that she will receive gender reassignment surgery under the Pentagon's new policies, which were announced in June, lifting the military's ban on transgender service members, her lawyers said in a statement.

She still could remain in solitary confinement for charges related to her suicide attempt, "even though it was the government's own mistreatment of Chelsea that drove her to it," said Chase Strangio, a lawyer representing Manning for the American Civil Liberties Union.

"I am unendingly relieved that the military is finally doing the right thing. I applaud them for that. This is all that I wanted — for them to let me be me," Manning said in a statement released by her lawyers. "But it is hard not to wonder why it has taken so long."

Manning said she hopes the decision "sets a precedent for the thousands of trans people behind me hoping they will be given the treatment they need."

Emma Margolin contributed.