A Philadelphia judge on Friday overturned a 2015 murder conviction after prosecutors said they believe the lead detective — who has since been charged with raping and sexually assaulting male witnesses during his time on the force — built a questionable case while also attempting to groom potential witnesses as sexual targets.

The District Attorney’s Office said in court documents that it no longer believes the defendant, Arkel Garcia, is guilty of killing Christian Massey, a 21-year-old man with special needs who was shot dead in Overbrook in 2013 over a pair of headphones.

Instead, prosecutors wrote, they believe ex-Detective Philip Nordo obtained a false confession from Garcia — the main piece of evidence supporting an otherwise weak case — as he simultaneously tried to pursue sexual relationships with two men he interviewed as part of the investigation.

“Nordo had ulterior motives during this investigation that had nothing to do with solving this murder,” Assistant District Attorney Michael Garmisa said in court Friday.

In court documents, prosecutors cited emails and recorded phone calls between Nordo and his targets, saying he used coded language to discuss sex, reward money, and a pornography business he claimed to have access to. One email, prosecutors said, suggested Nordo may also have tried to “sexually exploit” Garcia.

Still, not long after Common Pleas Court Judge Tracy Brandeis-Roman agreed to throw out Garcia’s murder conviction — and prosecutors said they would not seek to retry him — the victim’s relatives said they were left heartbroken and devastated.

One of Massey’s cousins, Pebble Hill, 30, said in a phone interview that prosecutors didn’t speak with her family until a week ago, and, in her opinion, didn’t make clear that they would be so forceful in seeking to have the case overturned. (The DA’s Office provided documentation of earlier attempts to reach Massey’s relatives, but declined to comment further.)

She said many in her family still believe Garcia killed Massey, and that Friday’s outcome was especially painful because it felt as if they had been left with nothing — no closure, and no hope that the case would be reopened in an effort to identify another suspect.

“You’re overturning the conviction, but what about the victim?” she asked. “We’re devastated by the lack of justice on our end, and the lack of concern for our family member.”

Brandeis-Roman, the judge, called the case “tragic” for Massey and his relatives, and also for Garcia, who was imprisoned for seven years for a crime prosecutors now say he didn’t commit.

“It’s just all around tragic, unthinkable, and causes one to shudder,” she said.

Nordo, through his attorneys, has consistently denied allegations of rape and sexual assault since he was charged in 2019. He was fired a year and a half before that for related misconduct. His lawyers on Friday did not respond to requests for comment.

He was released on bail in March, court records say, and his trial is still months away. But District Attorney Larry Krasner’s office has been moving swiftly to undo cases prosecutors believe were marred by his misconduct.

Friday’s decision marked at least the sixth time in three years that a murder case Nordo helped build has collapsed — and the second time in two weeks.

On May 25, Common Pleas Court Judge Lillian Ransom agreed to vacate Ronald Thomas’ conviction for the 2010 fatal shooting of Anwar Ashmore after prosecutors said Nordo’s misconduct had not been sufficiently disclosed before either of Thomas’ two trials, in 2013 and 2018.

The grand jury investigation into Nordo was not made public until 2019. But the DA’s Office said former prosecutors “had actual knowledge of some of Nordo’s prior acts of misconduct” and that, by law, the information should have been shared with Thomas’ defense attorneys.

“Had either jury known about even a fraction of Nordo’s misconduct and/or issues regarding his credibility,” Krasner’s office wrote, “there is a reasonable probability that the jury would have reached a different verdict.”

Still, the DA’s Office has not yet agreed to drop the charges against Thomas, who remains jailed while awaiting a potential third trial.

Thomas’ lawyer, Jerome Brown, is representing several other clients in appeals featuring allegations of misconduct against Nordo.

Garcia, who did not attend Friday’s hearing, will remain in prison because of a separate conviction for aggravated assault after fighting with a sheriff’s deputy and trying to grab the officer’s gun in the courthouse after being found guilty in Massey’s murder.

Massey’s cousin, Hill, said it was disheartening that Garcia would have an upcoming shot at parole while her cousin’s murder could remain unsolved.

Massey was 6-foot-2 and 300 pounds, a “gentle giant” who lived part of his life in foster care and was a graduate of Marple Newtown High School, where he played football and basketball.

Hill said her cousin didn’t deserve to be killed, and that his slaying doesn’t deserve to be overshadowed by allegations of misconduct against a detective.

“We were robbed of somebody that was a good person to our family and the community,” she said. “It’s just sad, because the conversation about this case is going to be the city overturning another wrongful conviction, not the city reopening or not reopening a murder case for someone’s loved one.”