Washington (AFP) – Imprisoned transgender soldier Chelsea Manning has ended a hunger strike after five days when the US Army agreed to provide surgery to treat her gender dysphoria, her representatives said.

The move is a major milestone not just for Manning, but for the US military, which in June announced it would begin allowing openly transgender people to serve, and would cover medical expenses related to the condition.

Manning started a hunger strike Friday to protest what she said was the military’s refusal to treat her condition, and for forcing her to keep her hair short.

“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 the American Civil Liberties Union, which sued the Pentagon in 2014 over Manning’s medical treatment.

The Pentagon did not immediately respond to a request for comment.

Originally called Bradley, Manning was convicted in August 2013 of espionage and other offenses after admitting to handing classified documents to the anti-secrecy website WikiLeaks.

She attempted suicide in July and has repeatedly decried her treatment in a men’s military prison in Fort Leavenworth, Kansas, where she is appealing her 35-year sentence.

Chase Strangio, staff attorney with the ACLU, said Manning would still be subject to male grooming standards.

“It is nonetheless troubling that the government continues to insist that they will enforce the male hair-length standards against her and subject her to a disciplinary board over administrative charges related to her suicide attempt in July, which was precipitated by the government’s refusal to adequately treat her for gender dysphoria,” Strangio said.

The ACLU said no transgender individual had ever received “gender affirming” surgical treatment in prison before.

The Pentagon has said it would pay for troops to have gender surgery when deemed “medically necessary”.