WASHINGTON — President Obama on Tuesday largely commuted the remaining prison sentence of Chelsea Manning, the army intelligence analyst convicted of an enormous 2010 leak that revealed American military and diplomatic activities across the world, disrupted the administration and made WikiLeaks, the recipient of those disclosures, famous.
The decision by Mr. Obama rescued Ms. Manning, who twice tried to kill herself last year, from an uncertain future as a transgender woman incarcerated at the men’s military prison at Fort Leavenworth, Kan. She has been jailed for nearly seven years, and her 35-year sentence was by far the longest punishment ever imposed in the United States for a leak conviction.
The act of clemency could be seen as a reversal, at least in part, of the Obama administration’s unprecedented criminal crackdown on leaking: The administration has brought charges in about nine cases, about twice as many as under all previous presidents combined.
At the same time that Mr. Obama commuted the sentence of Ms. Manning, a low-ranking enlisted soldier at the time of her leaks, he also granted a pardon to Gen. James E. Cartwright, the former vice chairman of the Joint Chiefs of Staff and one of the highest-ranking officials ensnared in the leak crackdown.
General Cartwright had pleaded guilty to lying about his conversations with reporters when questioned by F.B.I. agents in an investigation into leaks of classified information about cyberattacks on Iran’s nuclear program.
Under the terms of Mr. Obama’s commutation announced by the White House on Tuesday, Ms. Manning is set to be freed on May 17 of this year, rather than in 2045.
The commutation also relieved the Department of Defense of the difficult responsibility of her incarceration as she pushes for treatment for her gender dysphoria — including sex reassignment surgery — that the military has no experience providing.
In recent days, the White House had signaled that Mr. Obama was seriously considering granting Ms. Manning’s commutation application, in contrast to a pardon application submitted on behalf of the other large-scale leaker of the era, Edward J. Snowden, the former intelligence contractor who disclosed archives of top-secret surveillance files and is living as a fugitive in Russia.
Asked about the two clemency applications on Friday, the White House spokesman, Josh Earnest, discussed the “pretty stark difference” between Ms. Manning’s case for mercy and Mr. Snowden’s. While their offenses were similar, he said, there were “some important differences.”
“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,” he 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.”
He also noted that while the documents Ms. Manning provided to WikiLeaks were “damaging to national security,” the ones Mr. Snowden disclosed were “far more serious and far more dangerous.” (None of the documents Ms. Manning disclosed were classified above the merely “secret” level.)
Ms. Manning was still known as Bradley Manning when she deployed with her unit to Iraq in late 2009. There, she worked as a low-level intelligence analyst helping her unit assess insurgent activity in the area it was patrolling, a role that gave her access to a classified computer network.
She copied hundreds of thousands of military incident logs from the Afghanistan and Iraq wars, which, among other things, exposed abuses of detainees by Iraqi military officers working with American forces and showed that civilian deaths in the Iraq war were probably much higher than official estimates.
The files she copied also included about 250,000 diplomatic cables from American embassies around the world showing sensitive deals and conversations, dossiers detailing intelligence assessments of Guantánamo detainees held without trial, and a video of an American helicopter attack in Baghdad in which two Reuters journalists were killed, among others.
She decided to make all these files public, as she wrote at the time, in the hope that they would incite “worldwide discussion, debates, and reforms.” WikiLeaks disclosed them — working with traditional news organizations including The New York Times — bringing notoriety to the group and its founder, Julian Assange.
The disclosures set off a frantic scramble as Obama administration officials sought to minimize any potential harm, including getting to safety some foreigners in dangerous countries who were identified as having helped American troops or diplomats. Prosecutors, however, presented no evidence that anyone was killed because of the leaks.
At her court-martial, Ms. Manning confessed in detail to her actions and apologized, saying she had not intended to put anyone at risk and noting that she had been “dealing with a lot of issues” at the time she made her decision.
Testimony at the trial showed that she had been in a mental and emotional crisis as she came to grips, amid the stress of a war zone, with the fact that she was not merely gay but had gender dysphoria. She had been behaving erratically, including angry outbursts and lapsing into catatonia midsentence. At one point she had emailed a photograph of herself in a woman’s wig to her supervisor.
Prosecutors said that because the secret material was made available for publication on the internet, anyone — including Al Qaeda — could read it. And they accused Ms. Manning of treason, charging her with multiple counts of the Espionage Act as well as with “aiding the enemy,” a potential capital offense, although they said they would not seek her execution.
Ms. Manning confessed and pleaded guilty to a lesser version of those charges without any deal to cap her sentence. But prosecutors pressed forward with a trial and won convictions on the more serious versions of those charges; a military judge acquitted her of “aiding the enemy.”
In her commutation application, Ms. Manning said she had not imagined that she would be sentenced to the “extreme” term of 35 years, a term for which there was “no historical precedent.” (There have been only a handful of leak cases, and most sentence are in the range of one to three years.)
“I take full and complete responsibility for my decision to disclose these materials to the public,” she wrote. “I have never made any excuses for what I did. I pleaded guilty without the protection of a plea agreement because I believed the military justice system would understand my motivation for the disclosure and sentence me fairly. I was wrong.”
After her sentencing, Ms. Manning announced that she was transgender and changed her name to Chelsea.
The military, under pressure from a lawsuit filed on her behalf by Chase Strangio of the American Civil Liberties Union, has permitted her to partly transition to life as a woman, including giving her cross-sex hormones and letting her wear women’s undergarments and light cosmetics.
But it has not let her grow her hair longer than male military standards, citing security risks, and Ms. Manning said she had yet to be permitted to see a surgeon about the possibility of sex reassignment surgery.
Until recently the military discharged transgender soldiers. In June, Secretary of Defense Ashton B. Carter changed that policy and said the military would instead provide treatment for them, eventually including such surgery if doctors said it was necessary.
But President-elect Donald J. Trump mocked that change as excessively “politically correct,” raising the possibility that he will rescind it.
Even if he does, Ms. Manning will soon no longer be subject to the military’s control.