President Barack Obama says former military intelligence analyst Chelsea Manning has served a tough prison term and his decision to commute her 35-year sentence to about seven years served won't signal leniency toward leakers of US government secrets.
Obama told his final news conference as president that he felt it made sense to commute Manning's sentence because she went to trial, took responsibility for her crime and her sentence was disproportionate to those received by other leakers.
"I feel very comfortable that justice has been served," Obama said.
Manning gave classified information of more than 700,000 documents, videos, diplomatic cables and battlefield accounts to anti-secrecy group WikiLeaks in 2010, the biggest such breach in US history.
Obama said the commutation was done without regard to WikiLeaks founder Julian Assange, who said on Twitter last Thursday that if Manning was freed, he would accept extradition to the United States, where there is an open criminal investigation into the activities of WikiLeaks.
"I don't pay a lot of attention to Mr Assange's tweets," Obama said, adding that he did not see a contradiction with his administration's approach to Assange and Manning.
The anti-secrecy organisation returned to prominence during the 2016 US presidential election, publishing hacked emails stolen from the Democratic National Committee and the accounts of senior Democrats.
US intelligence agencies have concluded that Russian intelligence agencies were responsible for the hacks and that they were carried out as part of a campaign by Moscow to help Republican Donald Trump win and discredit Democrat Hillary Clinton.
Obama said the intelligence agencies were not conclusive in their assessment of the hacks "whether WikiLeaks was witting or not in being a conduit" for Russia's efforts to use cyber attacks to influence the election. Assange has said the Russian government was not the source of the emails.
Manning, formerly known as US Army Private First Class Bradley Manning, was born male but revealed after being convicted of espionage that she identifies as a woman. The White House said on Tuesday that her sentence would end on May 17 this year.
Manning twice tried to kill herself last year and has struggled to cope as a transgender woman in the Fort Leavenworth, Kansas, men's military prison.