Chelsea Manning, serving a 35-year term for leaking a cache of classified military documents to WikiLeaks, had her sentence commuted Tuesday by President Barack Obama. The president, with just days remaining in his presidency, said Manning can be freed on May 17 of this year instead of 2045.

Further Reading Pentagon moving to get WikiLeaks leaker Manning gender treatment

The 29-year-old Army private was court-martialed in 2013 for forwarding a cache of classified documents to WikiLeaks. After being convicted of leaking more than 700,000 documents and video, Manning—then known as Bradley—announced that she is transgender and would be going by the name Chelsea.

Manning has been both reviled and lauded for her 2010 document dump and has been in prison longer than any other convicted US leaker. In a military first, Manning was approved in 2015 for hormone therapy as part of transition-related care, nearly a year after she made demands for such treatment.

Along the way, Manning has had several run-ins with the authorities at the military brig at Fort Leavenworth in Kansas. She has tried to commit suicide twice and even took on a hunger strike in a bid to win reassignment surgery.

Manning said in a petition to Obama that she "did not intend to harm the interests of the United States or harm any service members." She said an early release, not a pardon, was needed so she could continue her medical treatment.

The development raises the question of whether Julian Assange, the WikiLeaks founder, will surrender to US authorities. Assange has been living in a self-imposed exile in the Ecuadorian Embassy in London, amid fears he could be charged in the US for exposing the secrets Manning had leaked to the whistleblowing site. Five days ago, Wikileaks tweeted, "If Obama grants Manning clemency Assange will agree to US extradition despite clear unconstitutionality of DoJ case." (Later in the day, WikiLeaks said it "stands" by what Assange had promised.)

Edward Snowden, the NSA leaker living in Russia, urged the president last week to grant leniency to Manning. "Mr. President, if you grant only one act of clemency as you exit the White House, please: free Chelsea Manning. You alone can save her life."

Many have also called for the departing president to show a sign of mercy toward Snowden. But White House Press Secretary Josh Earnest said there was a "pretty stark difference" between the Manning and Snowden cases.

"Chelsea Manning is somebody who went through the military criminal justice process, was exposed to due process, was found guilty, was sentenced for her crimes, and she acknowledged wrongdoing," Earnest said. "Mr. Snowden fled into the arms of an adversary, and has sought refuge in a country that most recently made a concerted effort to undermine confidence in our democracy."

Meanwhile, in 2013, Manning described to a military courtroom why—and in precise detail, how—she sent WikiLeaks confidential diplomatic cables and "war logs," saying:

I felt we were risking so much for people who seemed unwilling to cooperate with us, leading to frustration and hatred on both sides. I began to become depressed at the situation we found ourselves mired in year after year. [CBS News] We were obsessed with capturing and killing human targets on lists and ignoring goals and missions. I believed if the public, particularly the American public, could see this it could spark a debate on the military and our foreign policy in general [that] might cause society to reconsider the need to engage in counter-terrorism while ignoring the human situation of the people we engaged with every day. [The Guardian]

Manning was upset by a classified video of a 2007 Apache helicopter attack in Iraq that was ultimately found to have killed civilians and a Reuters journalist. "For me that was like a child torturing an ant with a magnifying glass," Manning said, adding that the military "seemed" to have "bloodlust." Using Tor, Manning uploaded the video to WikiLeaks, and it went viral, becoming known as the infamous "collateral murder" video.

Manning said that after deciding to leak the millions of war documents from Iraq and Afghanistan, she tried to give them to The New York Times and to The Washington Post. Manning said a message left at the Times was not returned and said the Post did not take the offer seriously. Manning also considered Politico, but ultimately didn't meet up with that site because of bad weather.

She leaked the information to WikiLeaks from a Barnes & Noble in suburban Maryland. Manning saved the files on the memory stick of a camera and uploaded them from the bookstore during a 2010 mid-tour leave.

Obama on Tuesday granted 209 sentence commutations, bringing to 1,385 the number of commutations, the most granted by any US president. The president has also issued 212 pardons.

"While the mercy the President has shown his 1,597 clemency recipients is remarkable, we must remember that clemency is an extraordinary remedy, granted only after the President has concluded that a particular individual has demonstrated a readiness to make use of his or her second chance," the White House said.

A noteworthy pardon issued Tuesday benefited Marine Gen. James Cartwright, who lied to the Federal Bureau of Investigation about having conversations with reporters and leaking information about the US reportedly using the Stuxnet virus to sabotage an Iranian nuclear facility nearly a decade ago.