A Montana man’s “shaken-baby syndrome” murder conviction was overturned this week, after appeals attorneys effectively pointed out that the autopsy had ruled the manner of death as “undetermined” — something the defense attorney never even raised at trial.

Robert “Dave” Wilkes had been serving a 40-year stint in prison for the 2008 death of his son Gabriel, then three months old.

His initial defense attorney did not raise the “undetermined” cause of death autopsy issue — and ineffectively argued against the state’s “shaken-baby syndrome” case, District Judge James A. Haynes ruled Tuesday.

“The Court concludes the defense attorney failed to subject the prosecution’s case to meaningful adversarial testing,” the judge reportedly ruled. “Wilkes has shown his Sixth Amendment right to effective counsel was violated to such a degree as to jeopardize the fundamental fairness an integrity of his trial.”

The Montana Innocence Project took on the case in 2012, and came up with a series of alternative theories in the case — including a natural blood clotting disorder, according to the group. Their medical experts included those from Stanford and Boston University, among others.

“The medical evidence in this case is compelling and overwhelming, especially in light of the lack of any evidence of abuse or inflicted trauma,” said Toby Cook, a staff attorney with the Montana Innocence Project.

The state has to decide whether or not to drop the charges against Wilkes — and thereby decide whether to set him free.

According to court documents on file in Montana, Wilkes left his son in the care of a neighbor for most of the day on Oct. 4, 2008. When he picked Gabriel up, he put him down to sleep on a blanket on the bedroom floor of his apartment — but the boy vomited and went limp. Wilkes attempted CPR, and then ran back to the neighbor’s apartment to call 911.

Two days later, after a transfer to a second hospital, doctors at Sacred Heart Children’s Hospital in Spokane, Washington found evidence of subdural hemorrhaging in the brain and retinal hemorrhaging, and suspected non-accidental trauma, according to court documents. Police investigators eventually determined there was a severe brain injury that would have caused immediate devastating symptoms — implicating Wilkes, and not the neighbor who had watched him earlier.

Six months after the boy died, the state filed homicide charges against the first-time dad.

At trial, the defense called only one witness: Wilkes himself. The father continued to proclaim his innocence.

The defense attorney, Scott Spencer, consulted only one outside expert — and only had a single conversation with that expert, according to court filings. In fact, the defense attorney simply accepted the shaken baby syndrome theory of the death in his closing remarks to the jury.

“Ladies and gentlemen, I would think this has to be the most unpleasant tasks (sic) you’ve ever been asked to do, because you are standing in judgment of a person, basically shaking his baby to death. And if he didn’t, somebody else did,” said Spencer. “And, you have to decide, what you’ve heard, whether you are going to convict him of the charged crime … This is one of those cases, as, I think I told you, when we started, virtually everything here is agreed to.”

Shaken baby syndrome cases have resulted in some dramatic reversals of court decisions, like the set-aside conviction of Zavion Johnson in California last December, after serving 15 years in prison for allegedly shaking his baby to death. Johnson had claimed that he accidentally dropped his 4-month-old daughter on her head in the bathtub, and she later stopped breathing.

But shaken baby syndrome — called abusive head trauma (AHT) by the American Academy of Pediatrics — has firm scientific grounding despite defense attorneys’ arguments, according to a consensus statement published a month ago in the journal Pediatric Radiology. AHT is a valid diagnosis, according to those experts. The arguments that it is “controversial” hinge on a “triad” of symptoms — subdural hemorrhage, retinal hemorrhage, and encephalopathy — that could present in other medical conditions. But true AHT can include: subdural hematoma, retinal hemorrhage, rib and other fractures, and brain parenchymal injuries, according to that consensus statement.

The Montana Innocence Project scored another major victory last month with the exonerations of Paul Jenkins and Fred Lawrence last month in a 1995 robbery and murder, based on DNA mixture analysis of a bloody rope used as a ligature.