U.S. Army private Chelsea Manning has been approved for the gender-altering hormone treatments she has been fighting for ever since her incarceration two years ago for leaking confidential military information to WikiLeaks.

The hormone treatment places Manning, who legally changed her first name from Bradley last April, one step closer to becoming a woman, the Associated Press reported. Defense officials announced the landmark decision Thursday after a lengthy court battle over the military's refusal to administer such treatment to transgenders, who are not allowed to serve in the military.

Manning, who was convicted in 2013, cannot be discharged from the army as long as she is in prison.

A federal lawsuit was filed on Manning's behalf last September in the U.S. District Court for the District of Columbia, claiming the 26-year-old prisoner was in jeopardy of self-castration and is in need of expert treatment for gender dysphoria, or the feeling of being a woman trapped in a man's body, the AP reported.

Manning was already undergoing psychotherapy where she is serving her sentence in Fort Leavenworth, Kan. But it wasn't enough and the mental health expert in charge of the therapy was not trained to treat gender dysphoria, according to the lawsuit.

ACLU attorney Chase Strangio, who represents Manning, applauded the decision approved Feb. 5 by officials at Fort Leavenworth's U.S. Disciplinary Barracks.

"But the delay in treatment came with significant cost to Chelsea and her mental health and we are hopeful that the government continues to meet Chelsea's medical needs as is its obligation under the Constitution so that those harms may be mitigated," Strangio said, according to the AP.

Manning was found guilty of violating the Espionage Act after she leaked 700,000 classified documents on the Afghanistan and Iraq wars to the website WikiLeaks.