DETROIT (CN) – A federal judge dismissed Detroit from a civil rights lawsuit brought by a man who spent eight years in prison for four murders he didn’t commit, finding the city is immune from his claims of police misconduct because of its 2013 bankruptcy.

Davontae Sanford was 14 years old when he was convicted in 2008 of murdering four people after pleading guilty. Another person later confessed to the crimes and said Sanford was not involved.

An investigation found that Sanford’s confession was a result of misconduct by Detroit police. Sanford was freed in 2016 after spending eight years behind bars, and filed a federal lawsuit against Detroit and Officers Michael Russell and James Tolbert

U.S. District Judge David Lawson ruled Tuesday that while Sanford can pursue his case against the officers, his claims against the city must be dismissed.

“Detroit’s intervening bankruptcy bars Sanford’s claim against the city in this court because the final plan of adjustment discharged prepetition claims and the plaintiff is enjoined from pursuing his claim against the city except as the plan allows,” the judge wrote.

Two professional hitmen killed drug dealer Michael Robinson and three others in his Runyon Street home during a drug war in 2007. When police arrived, Sanford approached them in his pajamas and asked them what was going on.

“He was blind in one eye, functionally illiterate and had a learning disability,” according to Lawson’s ruling.

Russell and Tolbert interrogated Sanford even though he had no blood on him, the ruling states, and a gunshot residue test also came back negative.

After hours of interrogation with no guardian or attorney present, Sanford signed a confession that he was present during the planning of the crimes. The officers later interrogated him a second time.

“The defendants lied to Sanford during the interrogation, telling him he would be free to go afterwards, also falsely telling him that blood from the scene had been found on his shoes,” according to a summary of Sanford’s complaint in Lawson’s ruling.

Sanford was charged with four counts of first-degree murder and a firearm count after he signed a second confession containing more details that police had discovered. He was sentenced to 39 to 92 years in prison.

Two weeks later, police arrested one of the hitmen, Vincent Smothers, who confessed to the murders. He said Sanford was not involved. Russell, one of the questioning officers, told him to stop talking about the Runyon Street shootings.

Smothers was charged with eight of the 12 murders to which he had confessed his involvement, but was not initially charged with the Runyon Street killings.

Michigan State Police investigated the case in 2015, and Tolbert admitted that he had fabricated a sketch that had been attributed to Sanford.

Sanford was released in July 2016 and sued the city 14 months later alleging due process violations, malicious prosecution and violations of the Americans with Disabilities Act.

He also claimed that Detroit endorsed the practice of handling high-profile cases by hastily arresting any available suspect while ignoring evidence that points elsewhere.

The city argued that it was barred from being sued as a result of its 2013 bankruptcy, and Judge Lawson agreed.

“The courts that have considered the question uniformly have concluded that claims based on prepetition malicious prosecutions were barred,” Lawson wrote, “notwithstanding that the plaintiff could not file suit on his claims until his criminal conviction was overturned.”

Officers Tolbert and Russell argued that they too should be dismissed from the case, calling Sanford’s guilty plea and the appeals court’s upholding of his conviction “superseding causes” that bar his case.

But Lawson disagreed with the officers’ “curious position.”

“The defendants’ position that they should be absolved of liability for stacking the deck against the plaintiff because their efforts to corner him into a guilty plea succeeded is nonsense, and they cite no authority to support it,” the judge wrote.

The judge also allowed Sanford to pursue his ADA claim against the officers.

“He has plausibly alleged that his mental condition was such that he reasonably could have given his answer in the criminal proceeding inadvertently or by mistake – i.e., because he did not fully understand the nature and consequences of the question posed to him,” Lawson wrote.

Attorneys for Sanford and Detroit declined to comment on the ruling.