The nearly 30-year case against Sean Ellis looked to be nearly over Wednesday, as Suffolk District Attorney Rachael Rollins moved to drop the final remaining conviction against him relating to the 1993 murder of a Boston police detective — a crime he always maintained he did not commit.

“I was really just shocked by the level of corruption, but I knew that I was only hearing one side of the story,” Rollins told Jim Braude on GBH's Greater Boston Wednesday as she explained her thought process when she first began re-examining the case. “But now having gone through the long, hard process of looking at everything, it is really just a shameful chapter in our history as law enforcement.”

Ellis was first arrested in 1993 for the shooting death of Boston Police Detective John Mulligan, who had been killed while sleeping in his car in front of a Roslindale Walgreens. After two trials ended in hung juries, Ellis was convicted on the third of murder and first-degree robbery and sentenced to life without parole.

Later, however, two Boston police detectives pivotal to the case against Ellis — Walter Robinson and Kenneth Acerra — pleaded guilty to corruption charges, while a third police officer received immunity in exchange for testifying against the others. The whole affair cast doubt on witness testimony — which had included the niece of Acerra’s girlfriend — and physical evidence that the police claimed they had found at the scene.

Adding doubt to the prosecution’s case against Ellis was the fact that at the time of his death, Mulligan was being investigated for the allegedly robbing a suspected drug dealer. Ellis’ attorney said in 2014 that this fact was not revealed to the defense for two decades.

Ellis was freed on bail in 2015. Three years later, prosecutors announced that they would not pursue a fourth trial for the murder charge — although former acting District Attorney John Pappas and former Police Commissioner William Gross went to pains to emphasize that they were not declaring Ellis innocent.

Rollins took a different tack in the case, telling GBH News in November that the case had “a lot of very glaring constitutional violations.”

It was in that spirit that her office reexamined Ellis’ remaining gun conviction. Her motion Wednesday seeks a new trial for Ellis with the intention of then filing to drop the case.

Rollins said that she reached the decision after assembling an internal conviction integrity group that reexamined “thousands and thousands and thousands of pages” of documents in the case.

She also said that she spoke personally with Mulligan’s family, describing them as “the victims in this case” and also “very unhappy” with the decision.

Rollins, however, was confident in her choice.

“I have never seen this level of corruption,” she said of the case.