President Barack Obama has defended his decision to commute the sentence of transgender army private Chelsea Manning, who was jailed for 35 years for handing classified US documents to WikiLeaks.
Mr Obama was addressing his final presidential news conference a day after he pardoned 64 people and commuted the sentences of 209 others, including Manning, who will now be released in May, in one of his last acts in office.
He said: "With respect to Chelsea Manning I looked at the particulars in this case the same way I have with the other commutations I have done and pardons I have done and felt in light of all the circumstances that commuting her sentence was entirely appropriate."
There had been a mixed reaction to Mr Obama's decision to slash Manning's sentence.
She was convicted in August 2013 of espionage and other offenses, after admitting to the leak of 700,000 sensitive military and diplomatic documents.
Mr Obama told the press conference: "It has been my view that given she went to trial, that due process was carried out, that she took responsibility for her crime, that the sentence that she received was very disproportionate relative to what other leakers had received and that she had served a significant amount of time, that it made sense to commute and not pardon her sentence.
"Let's be clear, Chelsea Manning has served a tough prison sentence," the Mr Obama added. "I feel very comfortable that justice has been served."
The cache of documents leaked by Manning included military logs from wars in Iraq and Afghanistan and diplomatic cables offering sensitive, and often embarrassingly blunt, assessments of foreign leaders and world events.
Manning pleaded guilty and was sentenced by military court martial.
She has since been held in an all-male prison, at times in solitary confinement, and has attempted suicide twice.
Activists had argued her sentence is excessive and point to the psychological frailty of the transgender soldier.
WikiLeaks founder Julian Assange welcomed the decision and called for an end to a "war on whistleblowers".
"I welcome President Obama's decision to commute the sentence of Ms Chelsea Manning from 35 years to time served," Mr Assange said in a statement sent to AFP by one of his lawyers.
He said Manning should never have been convicted and described her as "a hero, whose bravery should have been applauded not condemned".
"In order for democracy and the rule of law to thrive, the government should immediately end this war on whistleblowers, and publishers such as WikiLeaks and myself," Mr Assange added.
Activists had argued Manning's sentence as excessive and point to the psychological frailty of the transgender soldier.
"This move could quite literally save Chelsea's life," said Chase Strangio of the American Civil Liberties Union.
Still, Mr Obama's move is something of a surprise, coming in the midst of a scandal over election related hacking.
Mr Obama has imposed sanctions on Russian intelligence services over the hack of Democratic party emails, some of which were released via WikiLeaks.
In recent weeks the White House had refused to be drawn on a possible commutation or pardon.
But spokesman Josh Earnest did attempt to paint a stark difference between Ms Manning - who went through the courts and admitted wrongdoing - and the likes of Edward Snowden.
Mr Snowden, a former National Security Agency contractor, fled to Hong Kong and then Russia in 2013 after revealing a highly classified global communications and internet surveillance system.
He was not on Mr Obama's list of commutations or pardons, but did tweet his thanks.
Let it be said here in earnest, with good heart: Thanks, Obama. https://t.co/IeumTasRNN— Edward Snowden (@Snowden) January 17, 2017
WikiLeaks - which has been linked to last year's election hacks - claimed "victory" and thanked those who campaigned on Manning's behalf.
"Your courage & determination made the impossible possible," the group tweeted.
But there was no suggestion Mr Assange - who is holed up in the Ecuadoran embassy in London - would make good on a promise to be extradited to the United States if Manning was freed.
"If Obama grants Manning clemency Assange will agree to US extradition despite clear unconstitutionality of DoJ case," the group tweeted last week.
White House officials dismissed any link between WikiLeak's pledge and Mr Obama's decision on Manning.
Republicans expressed outrage at Mr Obama's decision.
“This is just outrageous," said House Speaker Paul Ryan.
"Chelsea Manning's treachery put American lives at risk and exposed some of our nation’s most sensitive secrets."
"President Obama now leaves in place a dangerous precedent that those who compromise our national security won’t be held accountable for their crimes."
Republican Senator Tom Cotton, who is tipped as a possible future leader of the party, expressed fury at Mr Obama's decision, saying "we ought not treat a traitor like a martyr."
"I don't understand why the president would feel special compassion for someone who endangered the lives of our troops, diplomats, intelligence officers, and allies."
Republicans have been on the back foot over Russian hacks that appeared to help their presidential candidate Donald Trump.
Among the others who received commutations was Puerto Rican nationalist Oscar Lopez Rivera, who has been in prison for more than three decades on terrorism charges.
Mr Obama also pardoned James Cartwright, a former four-star general who lied to the FBI about his discussions with journalists about Iran's nuclear program.
Another round of commutations is expected today, officials suggested.
Mr Obama will deliver his final press conference at the White House later today, ahead of Mr Trump's inauguration on Friday.
Many will look to see whether the new list includes Bowe Bergdahl, a US Army sergeant held captive for five years by the Taliban before his release in a prisoner swap.
He is due to be court martialed for desertion.
Other names omitted last night were General David Petraeus - who pleaded guilty to improperly sharing classified information - and Mr Obama's ally Hillary Clinton.
There had been wild speculation that Mr Obama may choose to preemptively pardon her, forestalling any Trump-led prosecution over her handling of email as secretary of state.
Presidents can theoretically pardon people before they are even sentenced.