Chelsea Manning, who was court martialed for violating the Espionage Act, will be allowed to undergo gender transition surgery, Buzzfeed News reported.

Manning, 28, who was born Bradley, is serving a 35-year prison term for giving 750,000 of pages of classified and other sensitive information to WikiLeaks.

Buzzfeed quoted Manning attorney Chase Strangio as saying Manning will receive surgery for gender dysphoria on the recommendation of a psychologist.

“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.

“But it is hard not to wonder why it has taken so long. Also, why were such drastic measures needed? The surgery was recommended back in April 2016. The recommendations for my hair length were back in 2014. In any case, I hope this sets a precedent for the thousands of trans people behind me hoping they will be given the treatment they need.”

Strangio said Manning was informed of the decision Tuesday and shown a treatment plan, but was told she must keep her hair short until she has transitioned.

Manning, a former intelligence analyst, has been on a hunger strike since Sept. 9 and attempted suicide July 5.

“Thankfully the government has recognized its constitutional obligation to provide Chelsea with the medical care that she needs and we hope that they will act without delay to ensure that her suffering does not needlessly continue,” Strangio said in a statement.

Manning has been serving her sentence in the all-male, maximum security Fort Leavenworth (Kansas) prison. She was convicted in 2013 by a military court and shortly afterward asked to be considered a woman. The Army agreed last year to provide hormone therapy.