It was a battle over evidence, some that has been aired in courts repeatedly since Boston Police Detective John Mulligan was murdered in 1993 and some that was never presented to a jury.
As the Supreme Judicial Court heard the case Thursday, the justices focused on what jurors did not know when they convicted Sean Ellis of the brutal murder in 1995: Mulligan and some of the detectives who investigated his death were cohorts in a corruption scheme.
A Suffolk County prosecutor argued the corruption of Mulligan and some of his colleagues had no bearing on the case. Evidence that linked Ellis, 41, to two firearms involved in the crime is solid and remains unchanged since Mulligan died nearly 23 years ago, he said.
Looking on from the gallery was Ellis, who was freed on bail last June after now-retired Superior Court Judge Carol Ball ruled that his trial was unfair and granted him a new one. He was 19 when he was arrested for the murder of Mulligan, who was killed Sept. 26, 1993.
Prosecutors went before the SJC Thursday to try to reverse Ball’s decision.
“We’re not talking about just corrupt detectives who happened to investigate this,’’ defense attorney Rosemary Scapicchio told reporters after the hearing. “We’re talking about detectives who were desperate to cover up their own criminal activity and any connection it had to Detective Mulligan, and it resulted in an unfair trial for Sean.’’
Mulligan, 52, was shot five times in the face with a .25-caliber handgun while he slept in his truck outside a Roslindale drugstore on a paid detail. Ellis was convicted in 1995 of murder and sentenced to life without parole. Ellis had said he had gone to the drugstore to buy diapers the night of the shooting.
While Ball’s ruling said the trial was unfair, it did uphold guilty findings on firearms charges brought against Ellis. And Ellis’s codefendant, Terry L. Patterson, eventually pleaded guilty to manslaughter after his murder conviction was overturned.
“Once you have Ellis in possession of the guns, you have overwhelming evidence that the murder was committed by either Ellis or Patterson or both of them in combination,’’ Assistant District Attorney Paul B. Linn said.
“However this was done, whoever else was involved, Ellis and Patterson were the people who were there with the guns,’’ Linn said. “It all comes back to that.’’
The SJC upheld Ellis’s conviction in 2000. Thirteen years later, he filed a second motion for a new trial, leading to Ball’s decision that top Boston police officials engaged in a “rush to judgment’’ and wrongly allowed three corrupt detectives to play key roles in the homicide investigation.
The corrupt detectives were Walter F. Robinson Jr., Kenneth Acerra, and John Brazil, Ball’s ruling said.
Seventeen days before his murder, Mulligan and some of the rogue officers had been accused of participating in the armed robbery of a suspected drug dealer, Ball wrote.
Acerra and Robinson pleaded guilty in the 1990s to federal charges for conspiracy, civil rights, and tax violations, the ruling said. Brazil was granted immunity and testified before a federal grand jury that he created false search warrants, Ball wrote.
“There’s a huge difference between saying we have corrupt cops who were investigating a murder versus we have corrupt cops who are investigating a murder of somebody who participated with them in that corruption, and the fear that whatever they may elicit in that investigation may disclose things that may implicate them,’’ Chief Justice Ralph D. Gants said in the Thursday hearing. “Isn’t that a major game changer in terms of how one looks at the police investigation?’’
Gants later asked Scapicchio about evidence linking Ellis to the firearms.
She said it was “very suspect’’ that investigators asked about a .25 caliber weapon even before the gun used to kill Mulligan was found.
Had authorities provided defense lawyers with the evidence that has been recently unearthed, Scapicchio said they could have argued that the guns were planted on Ellis and suggested that police failed to investigate other potential suspects.
Suffolk District Attorney Daniel F. Conley, who took office in 2002 and inherited the Ellis case, attended the oral argument. His office has said Ball’s ruling is riddled with errors.
Ellis sat in court Thursday with his mother, Mary, 71, who said she is looking forward to spending Mother’s Day with her son Sunday for the first time in 22 years.
“The last time I was with my family as a free man I was fairly young,’’ Ellis said. “To be back with my family as an adult, it’s a tremendous feeling.’’
John R. Ellement of the Globe staff contributed to this report. Laura Crimaldi can be reached at email@example.com. Follow her on Twitter @lauracrimaldi.