In a stunning move, President Barack Obama on Tuesday commuted the bulk of the remaining prison sentence for Chelsea Manning, the former army intelligence analyst convicted in 2013 for disclosing military and diplomatic documents to radical transparency site WikiLeaks, according to The New York Times.

Manning, who was sentenced to 35 years for leaking diplomatic cables to WikiLeaks, will now be released on May 17 of this year, the Times reported.

The former soldier has been imprisoned at the male military prison at Fort Leavenworth, Kansas, where she twice tried to commit suicide last year. She was expected to be held there until 2045 after being convicted at court-martial of violations of the Espionage Act.

After her sentencing, Manning publicly came out as transgender and changed her name from Bradley to Chelsea. The military reluctantly agreed to allow her to partly transition to life as a female after the American Civil Liberties Union sued the U.S. Department of Defense in 2014 for initially refusing to do so.

Obama’s decision to commute Manning’s sentence comes just three days before the inauguration of President-elect Donald Trump. Transparency and civil rights activists had ramped up calls for Obama to pardon both Manning and former NSA contractor Edward Snowden, who leaked top secret surveillance files to the press, before Trump took office.

The White House recently signaled that they saw the two cases very differently.

“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,” White House press secretary Josh Earnest said at a press briefing last Friday. “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.”

Earnest also noted that the documents leaked by Manning were “damaging to national security,” but that those made public by Snowden were “far more serious and far more dangerous.”

Conservative commentators and politicians who said Manning’s leaks posed a risk to national security were quick to speak out against the commutation. House Speaker Paul Ryan (R-WI) said it was “outrageous” to pardon someone who “put American lives at risk,” while Sen. Tom Cotton (R-AR) released a statement saying that the U.S. should not “treat a traitor like a martyr.”

WikiLeaks, meanwhile, claimed “VICTORY.”

Manning copied hundreds of thousands of military incident logs from the Afghanistan and Iraq wars while deployed as a junior intelligence analyst in Iraq in 2009, as well as some 250,000 diplomatic cables.

The information that she passed along to WikiLeaks, which published the documents in coordination with news organizations like the Times, included revelations about human rights abuses and higher-than-reported civilian death tolls in Iraq.

Correction: The original version of post erroneously stated that Snowden faced a prison sentence. Snowden was charged with espionage in 2013, but has not faced trial; he was granted asylum in Russia, where he currently lives in an undisclosed location.