In 1991, Mr. Bunn, then 14, was arrested on charges of killing Rolando Neischer in the Kingsborough housing project in the Crown Heights neighborhood. According to trial testimony, two men on bicycles had approached a parked car in which Mr. Neischer was sitting with another officer, Robert E. Crosson, and ordered them to get out. A gun battle followed and Mr. Neischer was fatally wounded. Mr. Crosson, who was shot and wounded in the fight, survived and eventually identified Mr. Bunn and a second man, Rosean S. Hargrave, as the gunmen. Both men were later convicted of Mr. Neischer’s murder.

Image The former police detective Louis Scarcella. Credit... John Taggart for The New York Times

Last year, Justice Simpson released Mr. Hargrave from prison, citing the deficient police work of Mr. Scarcella and his partner at the time, Detective Stephen W. Chmil. In her order freeing Mr. Hargrave, Justice Simpson wrote, “The scant evidence that convicted the defendant makes the newfound wrongdoing of Detective Scarcella significant.”

Justice Simpson used similar language in reversing the conviction of Mr. Bunn, who is no longer in prison but remains on life parole. Noting that Mr. Scarcella had “procured identification testimony that was false” in several other cases, the judge wrote that his “malfeasance in fabricating false identification evidence gravely undermines the evidence that convicted the defendants in this case.”

“This has been a really long haul for John,” said Glenn Garber, Mr. Bunn’s lawyer. “He has lost a lot of hope and this has finally restored his faith in the system. Today justice was served.”.

On Wednesday, Alan Abramson, Mr. Scarcella’s lawyer, disagreed. “We find it troubling that Judge Simpson ruled on this matter now, as the Appellate Division is expected to rule shortly on her decision in the case of Mr. Bunn’s co-defendant, Rosean Hargrove,” he said. “Like the District Attorney’s Office, we believe her decisions were erroneous on both the facts and the law.”