A transgender soldier imprisoned in the US for leaking classified information to WikiLeaks will end a hunger strike after the Army agreed to allow her to receive medical treatment for her gender dysphoria.

Chelsea Manning's medical treatment will begin with surgery that was recommended by her psychologist in April, the American Civil Liberties Union said.

Manning began the hunger strike at Fort Leavenworth military prison in Kansas on Friday, vowing to continue until she received better treatment.

"I am unendingly relieved that the military is finally doing the right thing. I applaud them for that," Manning said.

"This is all that I wanted - for them to let me be me. But it is hard not to wonder why it has taken so long. 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."

Manning, who was arrested in 2010 as Bradley Manning, was convicted in 2013 in military court of leaking more than 700,000 secret military and State Department documents to WikiLeaks.

Manning was an intelligence analyst in Iraq at the time. She is serving a 35-year sentence.

ACLU lawyer Chase Strangio said Manning should "enjoy some peace" knowing the medical care was coming.

"Thankfully the government has recognised 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."

Ms Strangio said it is worrying that Manning still faces administrative charges related to a suicide attempt on July 5 at the military prison.

She wants the Army to drop those charges and stop efforts to make Manning cut her hair to male hair length military standards.

The ACLU filed a lawsuit in 2014 against the US Department of Defence over its refusal to treat Manning's gender dysphoria.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.