Chelsea Manning, the longest-serving whistleblower in US history, is set to be released from prison this week.

The transgender US Army private was sentence to 35 years behind bars in 2013, for her role in leaking more than 700,000 secret diplomatic and military documents and videos, to Wikileaks.

They included video footage of an Apache helicopter killing 12 civilians in Iraq's capital, Baghdad in 2007.

Ms Manning, born Bradley Manning, had her sentence commuted by Barack Obama in one of his last acts as president.

“President Obama’s act of commutation was the first time the military took care of this soldier who risked so much to disclose information that served the public interest,” Ms Manning’s attorneys said in a statement. “We are delighted that Chelsea can finally begin to enjoy the freedom she deserves.”

The attorneys did not specify Ms Manning’s exact release date, but a statement from the White House in January said her prison sentence is set to expire on 17 May.

Ms Manning confirmed the release was going ahead on her Twitter feed, saying: "Freedom was only a dream, and hard to imagine. Now it's here! You kept me alive".

She added: "For the first time, I can see a future for myself as Chelsea. I can imagine surviving and living as the person who I am and can finally be in the outside world."

Serving in Iraq in 2010, Ms Manning gained access to hundreds of thousands of documents from the Afghanistan and Iraq wars, which she subsequently passed to Wikileaks.

They cast doubt on official civilian death counts and exposed abuses of prisoners at Guantanamo.

Their release raised the whisteblowing website's profile immeasurably, but later that year Wikileaks founder Julian Assange was detained in the UK after Sweden issued an international arrest warrant over allegations of sexual assault.

After almost two years of legal wrangling, Mr Assange sought refuge in the Ecuadorean embassy in London, where he remains after being granted political asylum by the South American country on 16 August 2012.

Ms Manning meanwhile was sentenced in the US, to 35 years in 2013 for her role in leaking diplomatic cables to the anti-secrecy group.

Protesters urge Obama to commute Chelsea Manning's sentence Show all 12 1 /12 Protesters urge Obama to commute Chelsea Manning's sentence Protesters urge Obama to commute Chelsea Manning's sentence torbakhopper/Flickr Protesters urge Obama to commute Chelsea Manning's sentence Garry Knight/Flickr Protesters urge Obama to commute Chelsea Manning's sentence People hold signs calling for the release of imprisoned wikileaks whistleblower Chelsea Manning while marching in a gay pride parade in San Francisco, California June 28, 2015. Manning has appealed to an Army court to overturn her court-martial conviction, a court filing released on Thursday said. Reuters Protesters urge Obama to commute Chelsea Manning's sentence Around twenty activists associated with the Chelsea Manning support group rally in front of the White House in Washington DC, Sunday May 11, 2014. Stephen Melkisethian/Flickr Protesters urge Obama to commute Chelsea Manning's sentence Daily Chalkupy/Flickr Protesters urge Obama to commute Chelsea Manning's sentence Around twenty activists associated with the Chelsea Manning support group rally in front of the White House in Washington DC, Sunday May 11, 2014. Protesters urge Obama to commute Chelsea Manning's sentence Twitter Protesters urge Obama to commute Chelsea Manning's sentence Abigail Edward holds up a sign advocating the release of WikiLeaks whistle blower Chelsea Manning along the Gay Pride parade route in San Francisco, California on Sunday, June, 26, 2016. Josh Edelson/AFP/Getty Images Protesters urge Obama to commute Chelsea Manning's sentence Demonstration for Chelsea Manning in London, England, United Kingdom. Chelsea Manning (born Bradley Edward Manning) is a United States Army soldier who was convicted by court-martial in July 2013 of violations of the Espionage Act and other offenses, after disclosing to WikiLeaks nearly three-quarters of a million classified or unclassified but sensitive military and diplomatic documents. Manning was sentenced in August 2013 to 35 years imprisonment, with the possibility of parole in the eighth year, and to be dishonorably discharged from the Army. Manning is a trans woman who, in a statement the day after sentencing, said she had felt female since childhood, wanted to be known as Chelsea, and desired to begin hormone replacement therapy. From early life and through much of her Army life, Manning was known as Bradley; she was diagnosed with gender identity disorder while in the Army. Mike Kemp/Getty Protesters urge Obama to commute Chelsea Manning's sentence Chelsea M Queer Friends/Twitter Protesters urge Obama to commute Chelsea Manning's sentence Instagram Protesters urge Obama to commute Chelsea Manning's sentence Jil Love Revolution/Instagram

Commuting Ms Manning’s sentence in January, Mr Obama said he felt “comfortable that justice has been served.”

Many Republicans, including Speaker of the House Paul Ryan, criticised the decision as setting a "dangerous precedent" for national security leaks in the future.

Complicating Ms Manning’s sentence were her requests for the Department of Defence to pay for her gender reassignment surgery.