A military appeals court has overturned the conviction of a former Marine Corps scout sniper involved in desecrating the bodies of enemy fighters in Afghanistan in 2011, finding that the actions of the service's top officer at the time tainted the case.

The decision, by the Navy-Marine Corps Court of Criminal Appeals, was handed down Wednesday, five years after the original conviction.

In December 2012, Staff Sgt. Joseph Chamblin was sentenced to 30 days' confinement, docked in pay, and demoted to sergeant for participating in an incident in which multiple Marine snipers attached to 3rd Battalion, 2nd Marines, urinated on enemy corpses and then posted a video of the act to YouTube.

When the video got public attention, the incident made global headlines, creating a black eye for the Corps and prompting many prominent American leaders to denounce the snipers' actions.

The scandal would continue to make headlines in the years following, after a Marine attorney, Maj. James Weirick, came forward to allege that the then-commandant of the Marine Corps, Gen. Jim Amos, had attempted to interfere with the cases to ensure harsh punishments for the Marines involved. Evidence of this alleged interference mounted.

A 2012 affidavit from then-Lt. Gen. Thomas Waldhauser, appointed by Amos as the oversight authority for the sniper cases, states that Amos told him the Marines involved needed to be "crushed" and discharged from the Corps.

Waldhauser, now the four-star commander of U.S. Africa Command, also alleged that Amos asked him whether he would give all the snipers general courts-martial, the highest form of criminal trial. When Waldhauser responded he would not, Amos allegedly told him he could make someone else the convening authority for the cases.

Two days later, Amos did just that, appointing then-Lt. Gen. Richard Mills to take over. He told Waldhauser he had "crossed the line" in their previous conversation and was removing Waldhauser to fix that problem.

Weirick and another attorney, Col. Jesse Gruter, who both worked for Mills when he took over the sniper cases, alleged in affidavits that Amos and his attorney, Robert Hogue, continued to exert influence over the sniper cases.

In February 2012, Hogue requested that photos and videos of the sniper incident be classified as secret, a move that Weirick and Gruter saw as improper and designed to disadvantage legal defense teams for the snipers facing charges.

When Gruter complained about the alleged improper classification, he claims Amos' top lawyer, Maj. Gen. Vaughn Ary, tried to get him removed from Mills' legal team.

In spring 2012, Amos took to the road with a presentation he called the "Heritage Brief," a discussion with Marines intended to promote discipline and good behavior. The brief contained a photo of the sniper incident with the headline, "What Does America Think of Her Marines Today?"

Since the sniper cases were still being adjudicated, the brief raised concerns about unlawful command influence, a situation in which actions of a senior officer prejudice a legal case.

Around the same time, Amos met with Mills and asked him which Marines he planned to prosecute. Shortly thereafter, Lt. Gen. John Paxton, then-commander of II Marine Expeditionary Force, from which all the snipers were based, sent a memo to Amos with "updates and recommendations" about the sniper prosecutions.

Since the commandant was supposed to be completely hands-off regarding the legal proceedings, this memo also raised red flags for Gruter.

The Public Trust

Even though Chamblin pleaded guilty and got a relatively light sentence under a pretrial agreement, the appeals court found evidence of unlawful command influence that was never cured or eradicated in the case.

"The highest-ranking officer in the Marine Corps told [Waldhauser] that the appellant and his co-accused should be 'crushed,' " the court wrote. "This is an unusually flagrant example of UCI. We find that UCI this direct, and occurring at this level, is highly corrosive to public trust in this proceeding."

Gruter, who recused himself from the sniper cases over his belief that the government was withholding evidence of Amos' actions constituting unlawful influence, said in an affidavit that he would have advised a number of remedial measures to remove any taint from the cases after Amos removed Waldhauser and replaced him with Mills as the oversight authority.

"A member of the public, aware of these facts and this assessment from the [oversight authority's staff judge advocate], would lose confidence in the fair processing of this case," the court found.

Likewise, the court found, Amos' use of the sniper cases in his Heritage Brief would erode public confidence in the fairness of prosecution proceedings.

Because so much time has passed since Chamblin was convicted, the court decided that dismissal of charges, rather than retrial, was the only fair remedy.

"We ... find that public confidence in military justice requires dismissal with prejudice in this case," the court found.

Allegations of unlawful command influence would continue to color Amos' tenure until he retired in 2015.

Multiple oversight agencies, including the Defense Department Inspector General, investigated the allegations and cleared him of wrongdoing.

But at least one previous conviction has been overturned on appeal as a result of his Heritage Brief: the case of Staff Sgt. Steve Howell, who was convicted of rape and sexual assault in 2012 but had his conviction and 18-year sentence overturned in 2014 because of the appearance of unlawful influence in the case.

Chamblin, who left the Marine Corps shortly after his conviction, published a book in 2015 called "Into Infamy: A Sniper's War."

Reached for comment by Military.com, he declined to discuss the case before the government decides whether to appeal the ruling. It can do so anytime within 30 days from the date of the decision.

In all, eight Marines were punished in the fallout from the sniper scandal. Several received administrative punishments. Staff Sgt. Edward Deptola and Sgt. Rob Richards, like Chamblin, pleaded guilty and received demotions at special court-martial proceedings. It's not clear if Richards' and Deptola's cases are also under appeal.

Richards, who was severely wounded in 2010 and had been nominated for a Bronze Star for valor on the 2011 Afghanistan deployment, died in 2014 at the age of 28. He was buried in Arlington National Cemetery with full military honors.

Weirick would ultimately be fired from his position after sending an email regarding the cases to Peter Delorier, one of Amos' attorneys. Delorier perceived the strongly worded missive as threatening.

"It is a positive step that the court exposed the illegal and unethical conduct of Jim Amos and Vaughn Ary, but their reprehensible conduct also deprived the other Marine snipers of a fair hearing," Weirick told Military.com in a statement. "Those cases must also be vacated to ensure justice and help restore public confidence in the military justice system."

-- Hope Hodge Seck can be reached at hope.seck@military.com. Follow her on Twitter at @HopeSeck.