President Barack Obama has commuted the prison sentence of Chelsea Manning, the former US military intelligence analyst who is serving 35 years in prison for passing classified files to WikiLeaks.
Manning will be freed on 17 May instead of her scheduled 2045 release.
She was sentenced to 35 years in 2013 for her role in leaking diplomatic cables to the anti-secrecy group while she was deployed in Iraq.
The leak was one of the largest breaches of classified material in US history.
Manning accepted responsibility for leaking the material. She said she was confronting gender dysphoria at the time of the leaks.
She is among more than 200 prisoners to have their sentences commuted by Mr Obama.
Just days ago, Wikileaks tweeted that its founder, Julian Assange, would agree to extradition if Manning was freed.
Mr Assange has sought refuge in the Ecuadorian embassy in London since 2012, to avoid extradition to Sweden and potentially the US.
Manning, 29, was convicted of 20 charges in connection with the leaks, including espionage. She was acquitted of the most serious charge, aiding the enemy.
Among the 720,000 files she passed to Wikileaks was video footage of an Apache helicopter killing 12 civilians in Baghdad in 2007.
Wikileaks released tens of thousands of documents relating to the Afghan war.
The website later disclosed thousands of sensitive messages written by US diplomats and military records from the Iraq war, causing growing embarrassment to the US government.
Manning told a court she leaked the documents to spark a public debate about the role of the military and about US foreign policy.
At a later sentencing hearing, she apologised for "hurting the US" and said she mistakenly believed she could "change the world for the better".
In November, she urged Mr Obama to reduce the remainder of her sentence to the six years she had already served.
She said she took "full and complete responsibility" for her actions and was not asking for a pardon.
During her time in prison, she fought the US army over receiving gender reassignment surgery and attempted suicide last July.
Later in 2016 she went on hunger strike, which she ended when the army agreed to provide her with the surgery.
-BBC/Reuters