A Philadelphia man who has served 10 years of a life sentence without parole for a 2008 murder in Kensington, and who claims he was framed by a tainted city homicide detective, was ordered released from state prison Wednesday after the District Attorney’s Office withdrew the charges.

Dwayne Thorpe, 35, had maintained his innocence since his 2008 arrest in the fatal shooting of Hamin Span in the 2000 block of Elkhart Street on July 4 that year. He won the right to a new trial in 2017 after making his allegations against the detective, James Pitts.

In throwing out the murder conviction in November 2017, Common Pleas Court Judge M. Teresa Sarmina ruled that a statement Pitts took from witness Allan Chamberlain that led to Thorpe’s arrest was coerced, and that testimony Pitts provided during the trial was prejudicial.

The District Attorney’s Office could have tried Thorpe again next month, but prosecutors Wednesday told Common Pleas Court Judge Gwendolyn Bright in front of 15 of his relatives that the office wanted to drop the charges, and the judge granted the request.

Ben Waxman, spokesperson for District Attorney Larry Krasner, said the office had determined that the key evidence in the case was “based on a suggestive photo array.”

“We’re duty bound to only prosecute cases where we believe that we can prove guilt beyond a reasonable doubt, and that standard was not met in this case,” Waxman said.

Thorpe’s attorney, Todd Mosser, said two photo arrays that Pitts showed a 15-year-old witness to the murder were highly suggestive because Thorpe was the only man out of 16 who did not have a dark complexion. The witness, Nafis Robinson, was the half brother of the murder victim.

Assistant District Attorney Michael Garmisa on Wednesday cited the suggestive nature of the photo arrays and Robinson’s reluctance to come to court again among the reasons his office decided to drop the case.

“I think they deserve credit for recognizing that the case should have been dismissed,” Mosser said of the DA’s Office. “They did an extraordinary amount of work re-investigating the case and they came to the right conclusion.”

Mosser, who represented Thorpe pro bono, presented evidence from 10 unrelated cases in which Pitts allegedly used coercive tactics to get witnesses to make false statements.

Chamberlain, a friend of Thorpe’s, alleged during the trial that Pitts had punched him in the stomach and threatened to take his son away if he did not give a statement saying Thorpe told him that he was going to shoot someone hours before the killing of Span.

Pitts recently was reassigned to a position in which he has no contact with the public.

Thorpe’s mother, Michelle Evans, expressed joy at the decision to free him.

“I’m just overwhelmed, I’m happy,” Evans said in an interview. “I never stopped believing in God and that the DA would do the right thing. I’m just disappointed in the Philadelphia Police Department having Detective Pitts on the force. He’s allowed to destroy lives and families.”

Evans said that her son recently became a follower of Islam and is looking forward to putting prison behind him, but she’s concerned that a decade behind bars will impact his ability to find employment.

“I pray my son is able to make it out here, because it’s so hard for the black man,” she said. “I pray my son is able to come out and take care of himself, take care of his daughter, and be loving to his family. But that’s my boy. I love him and I never gave up on him.”