For 37 years, the key witness who had accused Willie Stokes of murder maintained that his testimony against Stokes was a lie, fabricated by homicide detectives who bribed him with access to sex and drugs.

The witness, Franklin Lee, testified against Stokes at his 1984 preliminary hearing for the murder of Leslie Campbell in North Philadelphia. But at Stokes’ trial, he surprised the prosecutor by recanting. Stokes was convicted anyway, and sentenced to life without parole.

What Stokes would not discover for decades was that the Philadelphia District Attorney’s Office had then prosecuted Lee for perjury — for lying not at his trial, but at the preliminary hearing. “Defendant said Willie Stokes told him he killed Leslie Campbell,” reads the charging document. It continued: “Defendant knew Willie Stokes had not made such a statement.”

Last week, a federal judge vacated Stokes’ conviction, citing “the Commonwealth’s egregious violation of Petitioner’s constitutional rights, by withholding crucially exculpatory evidence” — Lee’s perjury conviction — and ordered him retried or released.

» READ MORE: Informants say cops traded sex for lies in murder cases (from July 2021)

“We just want him home. It’s been a long fight,” said Stokes’ sister Renee, who was waiting to hear if the Philadelphia DA’s Office would drop the case. District Attorney Larry Krasner has acknowledged that evidence against Stokes was improperly suppressed but had not said whether his office will proceed with a new trial.

She said she and her mother, Gloria Williams, 80, are trying not to get their hopes up after many years of planning — and then canceling — homecoming meals. “How can I have faith in the justice system when they failed us so many times?” she said.

The order issued Thursday by Timothy J. Savage, a senior judge in the Eastern District of Pennsylvania, means Stokes must finally be released unless he can be retried within 120 days. It also represents a major break in a series of cases in which jailhouse informants alleged that the same detectives — Ernest Gilbert and Larry Gerrard — coerced their testimony with threats and unorthodox bribes, including sexual liaisons and lenient sentences.

The allegations, a deal some prisoners’ lawyers nicknamed “sex for lies,” were first raised more than 30 years ago, when a federal judge overturned the conviction of Arthur Lester, who said Gilbert and Gerrard used those tactics to coerce his confession.

Stokes is one of at least six men still in prison on convictions tainted by such claims.

Krasner, in a statement Monday, noted that his office supported Savage’s decision and cited The Inquirer’s reporting on Stokes’ case, which brought to light the detectives’ alleged pattern of misconduct.

“This remarkable case is marked by prosecutorial and policing practices that were too pervasive during the so-called tough-on-crime 1980s and 1990s, and unfortunately persist in far too many jurisdictions today. Prosecutors have an obligation to seek justice, and to redefine prosecutorial success — not by ‘wins’ in the form of convictions, but by accuracy and fairness in resolving criminal investigations and prosecutions,” he said in the statement.

The DA’s Office in December also reversed its position and agreed to turn over case files to another man in that group, Major Tillery, who has served 36 years in prison for the murder of John Hollis. Tillery and his codefendant, William Franklin, maintain their innocence, and two witnesses against them said they lied in court in return for favors from the detectives.

In Stokes’ case, the DA’s Office had likewise opposed petitions for years, until an evidentiary hearing in November. Afterward, prosecutors from the office acknowledged in a court filing that “for over thirty years it did not disclose Mr. Lee’s perjury charge and guilty plea.”

At that November hearing, Lee, 62, testified as Stokes listened via teleconference from the State Correctional Institution Chester.

Lee was facing rape and murder charges, he said, when detectives offered him “sex, drugs and a [plea] deal” if he would help them frame Stokes. He said his girlfriend was allowed to meet with him in private at Police Headquarters. Another time, he said, his girlfriend refused to come so the detectives provided condoms and a sex worker.

» READ MORE: A record number of homicide exonerations call decades of investigations into question

“I’d like to, if I can for the record, apologize to Mr. Stokes and the family for the problem I caused,” Lee said at the hearing.

U.S. District Court Magistrate Judge Carol Sandra Moore Wells asked if Stokes would like to respond, but his lawyer, Michael Diamondstein, advised Stokes to stay quiet. “Let the record reflect he’s crying,” Wells said. “I’m going to take his tears to indicate he’s accepting the apology.”

There was no physical evidence tying Stokes to Campbell’s murder. A second, surviving victim testified that Stokes was not the shooter. Only one eyewitness at trial placed Stokes at the scene holding a gun — but not shooting. That man, Darryl Hargrove, told The Inquirer that Stokes “shouldn’t be in there” but declined to elaborate.

“This evidence fatally undermines confidence in Stokes’s conviction,” Assistant DA David Napiorski wrote after the hearing, conceding that Stokes deserved relief.

Last week, though, as COVID-19 cases spiked in the region, Stokes asked to be placed into solitary confinement at the State Correctional Institution Chester rather than accept a cellmate and the risk of contagion. His family has not heard from him since, Renee Stokes said.

They’re waiting.

His mother had his childhood bedroom remodeled, purchasing a blanket with the words Home Sweet Home to cover his bed. The day the DA’s response was filed in December, she stocked her fridge with collards and other essentials to cook a homecoming feast of Stokes’ favorites.

His sister Renee has been driving around with a new sweat suit in the trunk of her car. After all these years, Renee Stokes wasn’t sure of his clothing size. The only thing he was able to tell her for certain, she said, was “I don’t want to come out in [prison] browns.”

Diamondstein said now he’s urging the court to act quickly to free Stokes, who would be the longest-serving exoneree in Pennsylvania history.

“We’re hopeful that the Philadelphia District Attorney’s Office will recognize the injustice done to him and dismiss this case with all due haste,” he said. “This is another stark reminder of the lawlessness and racism exhibited by the Philadelphia law enforcement community. We’re hopeful that this stark reminder can help those in power recognize that changes must be made to ensure justice for all Philadelphians.”