Whatever decision President Barack Obama made regarding Chelsea Manning's petition for clemency, commuting her sentence or leaving it in place, was going to be controversial. The Manning case has always defied clear-cut definitions.
Was Manning a whistleblower? In my view, no.
She had little idea what was in the trove of sensitive and classified documents she provided to Wikileaks and Julian Assange six years ago. She thought that information should be free, but had no ability to evaluate whether the perceived benefit of disclosure outweighed the consequences.
The disclosures generated turbulence in almost every relationship between the United States and its global partners, but thankfully the overall impact was manageable.
More on Chelsea Manning
That said, her actions placed real people at risk. Lives were permanently upended. Mr Assange has said repeatedly that there is no evidence people were harmed by the disclosures. He's wrong.
Was Manning a traitor? Again, I don't think so.
She was a troubled and naive soldier who should not have graduated from basic training, much less been sent to a war zone. Had the military installed appropriate computer network security within Manning's intelligence unit, she could not have passed such a volume of documents to Wikileaks.
Chelsea Manning thought the American people needed to understand what the war in Iraq looked like.
She could have done that without compromising diplomatic cables, most of which had nothing to do with Iraq.
These systemic failures do not mean she should avoid accountability. Her actions were a serious breach of her duty as a soldier, particularly in a war zone. I believed her prosecution was important and necessary.
My comments questioning Manning's treatment in custody, which instantly dismayed the White House, were made because the harassment and abuse she endured threatened the legitimacy of her prosecution.
The purpose of military justice is to sustain good order and discipline. Her 35-year sentence sent a stern message - if you fail to protect classified information, there will be consequences.
But good order and discipline did not require her to serve the entire sentence.
Built into her sentence was the opportunity for parole. I strongly believed the military should release her at the first opportunity. An all-male military prison is not a proper environment for someone going through a gender transition.
President Obama obviously accelerated that timetable. I believe his action represents an appropriate balance of justice and compassion.
The Obama administration has been unfairly accused of a war on leaks. The technology that enables individuals to acquire unprecedented amounts of information, whether military secrets or political emails, also helps law enforcement officials identify who did it.
At the same time, the government cannot prosecute its way to greater information security. There are important secrets that need to be protected, but technology and culture are making that job harder.
Today's culture, enabled by technology, is to share information, whether a secret or a selfie. This instinct is not treasonous. It's human nature.
Beyond the Manning case, Obama also pardoned Marine General James Cartwright, who acknowledged discussing highly classified information with David Sanger of The New York Times.
Given the plea bargain that the government negotiated with General David Petraeus, who gave a classified diary to his biographer, the White House was undoubtedly uneasy about giving the generals a get out of jail free card and leaving the private behind bars.
Who has been critical?
"This is outrageous. Chelsea Manning's treachery put American lives at risk and exposed some of our nation's most sensitive secrets." - Speaker of the House Paul Ryan
"I don't understand why the president would feel special compassion for someone who endangered the lives of our troops, diplomats, intelligence officers, and allies. We ought not treat a traitor like a martyr." - Senator Tom Cotton, a US veteran
"A grave mistake that I fear will encourage further acts of espionage and undermine military discipline. It also devalues the courage of real whistleblowers who have used proper channels to hold our government accountable." - Sen John McCain
Mr Trump "is troubled by this action. It's disappointing and it sends a very troubling message when it comes to the handling of classified information." - Sean Spicer, Trump spokesman
Donald Trump has made no secret of his desire to improve relations with Russia.
It's no small irony that two significant issues at the centre of the turbulent relationship revolve around leaks: the Russian intelligence operation, employing WikiLeaks to release internal emails from the Clinton campaign in order to undermine the 2016 presidential election, and the temporary asylum granted by Russian President Vladimir Putin to Edward Snowden, who compromised far more consequential intelligence information than Manning did.
The incoming Trump team, less than three days from assuming office, called Mr Obama's action "partisan politics at its worst". Whatever one thinks of his decision, partisanship had nothing to do with it.
Rather, this is the real world that President-elect Trump is about to inherit, with all the complexities, difficult decisions and inevitable leaks that go with it.
PJ Crowley is a former US Assistant Secretary of State and author of Red Line: American Foreign Policy in a Time of Fractured Politics and Failing States.