When Private First Class Bradley Manning was arrested in 2010, accused of passing hundreds of thousands of documents, many sensitive and classified, to WikiLeaks, he became a global figure. When he was mistreated in jail, he became a sympathetic figure. Now the US military is at risk of making Manning a martyr by pursuing the charge of "aiding the enemy", even though it has a guilty plea from Manning, carrying a 20-year sentence, already in hand.

The trove of documents Manning admitted sending to WikiLeaks included raw intelligence reports from the Iraq and Afghanistan battlefields. This compromised sensitive operational details and valuable sources of information, and placed real people at risk.

While there have been negative consequences on a country-by-country basis, WikiLeaks has not resulted in lasting strategic effects, particularly regarding the course of events in various locations where the US was or remains engaged in significant counterterrorism operations against al-Qaida, its affiliates and associates like the Taliban.

Even if the military could plausibly make its case, should it? I don't think so. Proceeding to trial, at present planned to start on 3 June, will further erode the credibility of the US military justice system, already damaged by the continued existence of Guantánamo (and now confronted with detainee hunger strikes as well). As I wrote two years ago in the Guardian, after leaving the department of state, "actions can be legal and still not smart".

The external costs to American public diplomacy of keeping Manning on the global stage now outweigh any additional benefit from further legal action. The longer the case goes on, the greater the opportunity for international rivals to make propaganda hay at America's expense. After a recent appearance on RT, Russia's English language broadcast network, it became clear to me that Moscow, having been stung by the Sergei Magnitsky case, was happy to return fire through both Bradley Manning and Guantánamo.

Manning's lengthy statement before a military judge in February this year reveals why he is guilty of the misuse of classified information but also why he should not spend the rest of his life in a military prison.

Take the case of his first leaked diplomatic cable about a dispute among European treaty allies about the consequences of a failed Icelandic bank. Manning read an analysis from the US embassy in Reykjevik about the Icesave case and concluded that the US, while not a party in the dispute, was not being helpful enough to Iceland.

Manning, usurping the roles of the US secretary of the treasury and chairman of the Federal Reserve, said he wanted to "right a wrong", and expose what he thought were "backdoor deals". Yet by the time he forwarded the diplomatic cable to WikiLeaks in February 2010, the bank had been closed for more than a year; the matter was being openly debated in national capitals and extensively covered by global media. It was ultimately resolved in court.

These weren't the actions of a whistleblower, but rather a window shopper in a classified database who knew little about the Icesave case but thought it seemed "important". But they were also the actions of a naive and misguided soldier who had a narrow window to the war around him and saw glimpses of events that undercut not just the American strategy in Iraq, but its standing around the world. Manning provided WikiLeaks the gunsight video of an Apache helicopter crew that mistook a group of civilians, including journalists, for insurgents. His rationale was that the military was slow-rolling a freedom of information request for the clip by Reuters. And Manning thought he could "spark a debate" about US policy in Iraq. Whatever one thinks of his judgment, there is no indication he did anything with the intention of helping any adversary.

Given the inherently political nature of 21st-century conflicts, credible narratives will be more decisive than bullets and bombs. The critical terrain of "clear, hold and build" is the perceptions of key global audiences, sustaining their understanding, support, trust and legitimacy for strategic interests and actions. In this context, any unwarranted action that provides an adversary with a propaganda victory could be considered "aiding the enemy".

If Bradley Manning is guilty, he has a lot of company. Those responsible for mistreating prisoners at Abu Ghraib had a far more significant impact on perceptions of the Iraq war than Manning did. The Qu'ran-burning incident provided the Taliban with a vehicle to deride the US combat presence in Afghanistan and suspend informal reconciliation talks that are ultimately vital to the successful conclusion of the conflict there. Personnel involved in these incidents were disciplined but not charged with "aiding the enemy".

Manning also told the court how easy it was to create backup copies of classified documents and download them on to unclassified discs, chips and computers. His unit failed to follow basic computer network security procedures that would have prevented this.

Broadly speaking, the civilian justice system exists to keep society safe, while the military justice system enforces good order and discipline. While many sympathise with Bradley Manning, a cornerstone of military service is that valid orders issued at higher levels are carried out at lower levels. His job in Iraq was to defend national interests, not define them. He failed to carry out that duty and has accepted responsibility for his actions.

The military has done what it needs to do, sending a clear message that there will be severe consequences for compromising classified information. Now, it should accept Manning's guilty plea, send him away for 20 years and move on.

Anything more speaks not of a beacon of justice but a bully.