President Barack Obama has slashed the prison sentence of Chelsea Manning, the former US army intelligence analyst jailed for leaking classified files to WikiLeaks.
Manning was serving a 35-year sentence, but will be released on May 17, the White House said.
The former army private leaked hundreds of thousands of military incident logs, which detailed the abuse of detainees and an increase in civilian deaths during the Iraq war, to the WikiLeaks website.
It was the biggest breach of classified materials in US history.
She was known as Bradley Manning at the time of her 2010 arrest but was allowed to receive gender transition surgery while in prison.
Manning, who is held at a military prison in Kansas, has tried to kill herself twice while behind bars.
Chase Strangio, an American Civil Liberties Union attorney representing Manning, said the President’s action had “quite literally saved Chelsea’s life”.
“We are all better off knowing that Chelsea Manning will walk out of prison a free woman, dedicated to making the world a better place and fighting for justice for so many,” he said in a statement.
The commuting of Manning’s sentence will no doubt spark speculation about the future of WikiLeaks’ founder Julian Assange, who has been holed up for four years inside the Ecuadorian embassy in London.
Earlier this month, the official Twitter account of WikiLeaks said:
A White House official said the President’s decision on Manning was not influenced in any way by WikiLeaks or Mr Assange.
Edward Snowden, who fled the US in June 2013 after leaking classified documents that revealed domestic telephone metadata was being collected by security agencies, welcomed Manning’s news.
“In five more months, you will be free. Thank you for what you did for everyone, Chelsea. Stay strong a while longer,” he tweeted.