The transgender former Army private was convicted of the biggest data breach in U.S. history.
Former soldier Chelsea Manning, who gave more than 700,000 secret documents to WikiLeaks, was granted clemency Tuesday by outgoing President Barack Obama.
The transgender inmate twice tried to kill herself last year in the men’s prison at Fort Leavenworth, Kansas. She had repeatedly asked to be transferred to a female civilian correctional facility.
Read: Army Whistleblower Chelsea Manning Hospitalized After Suicide Attempt
The former U.S. Army private had served seven years of a 35-year sentence, the longest punishment ever handed down for leaking classified information.
Shortening her prison stay was one of Obama's last official acts in office. He also pardoned Gen. James E. Cartwright, former vice chairman of the Joint Chiefs of Staff, who pleaded guilty in October to making false statements to investigators during a probe into leaked materials that detailed a covert cyberattack on Iranian nuclear facilities.
"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," said Chase Strangio, an American Civil Liberties Union attorney representing Manning.
She is scheduled to be released in May.
The White House had no comment on a Jan. 12 tweet from WikiLeaks founder Julian Assange saying he would agree to be extradited, from the Ecuadorean Embassy in London to the U.S., in exhange for Manning's release.
GOP House Speaker Paul Ryan called the clemency “just outrageous.”
White House officials said Obama granted Manning a shorter sentence because she had expressed remorse for what she did and had already served several years behind bars, The Associated Press reported.
The officials spoke to journalists via a conference call on condition of anonymity, the wire service said.
Read: Edward Snowden Leaves Behind Pole Dancing Girlfriend
Obama also granted 64 other pardons and 207 other commutations, mostly of drug dealers.
Manning, who was born a male, deployed to Iraq in 2009 as Pfc. Bradley Manning, a low-level intelligence analyst who nonetheless had access to classified computers.
Manning copied thousands of documents that exposed detainee abuse by Iraqi military officers working with Americans, as well as video of a U.S. helicopter attack in Baghdad that killed civilians and two Reuters journalists.
The soldier passed that information to WikiLeaks, which was just gaining fame under Assange.
Manning ultimately pleaded guilty in a deal with prosecutors. After being demoted to private, the soldier announced she was transgender and began gender-reassignment treatment.
Watch: Trump Blasts Intel Report, Calls CNN 'Fake News' at First Presser as President-Elect