Defense Secretary Ash Carter strongly opposed President Barack Obama’s decision to commute the sentence of former Army soldier and transgender person Chelsea Manning, in effect allowing Manning to walk free on May 17.

A U.S. official said that Carter opposed the decision in no uncertain terms, even though the administration in the end pushed the move through for two main reasons, the first being that Manning had already served seven years and the second that Manning showed remorse and accepted responsibility, according to ABC News.

On defense-related matters, Obama has repeatedly run up against the recommendations of those he has tapped to lead the Pentagon, which is one of the reasons why he’s been through four different secretaries of defense.

Manning, a former Army intelligence analyst, was convicted and sentenced in 2013 to 35 years in prison for leaking hundreds of thousands of documents about U.S. military’s activities in Afghanistan and Iraq to WikiLeaks.

While in prison, Manning has suffered from poor mental health and has attempted suicide twice.

Chase Strangio, attorney for Manning, said that it’s possible the commutation saved Chelsea’s life.

“I’m relieved and thankful that the president is doing the right thing and commuting Chelsea Manning’s sentence,” Strangio said in a statement.

[dcquiz] “Since she was first taken into custody, Chelsea has been subjected to long stretches of solitary confinement — including for attempting suicide — and has been denied access to medically necessary health care,” Strangio added. “This move could quite literally save Chelsea’s life, and 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.”

Other Republicans sided with Carter’s opposition to the commutation.

House Speaker Paul Ryan derided the decision as creating a precedent that leakers who endanger the safety of Americans won’t have to serve a full sentence for what they’ve done.

“This is outrageous,” Ryan said. “Chelsea Manning’s treachery put American lives at risk and exposed some of our nation’s most sensitive secrets.”

GOP Sen. John McCain, chairman of the Senate Committee on Armed Services, echoed Ryan’s sentiments.

“I’m stunned,” McCain said. “President Obama’s commutation of Chelsea Manning’s sentence is a grave mistake that I fear will encourage further acts of espionage and undermine military discipline. It also devalues the courage of real whistle-blowers who have used proper channels to hold our government accountable.”

Follow Jonah Bennett on Twitter

Send tips to jonah@dailycallernewsfoundation.org.

Content created by The Daily Caller News Foundation is available without charge to any eligible news publisher that can provide a large audience. For licensing opportunities of our original content, please contact licensing@dailycallernewsfoundation.org.