The city has agreed to pay $5 million to a North Philadelphia man who spent 27 years in prison for a murder he said he didn’t commit — and who was released in 2019 after prosecutors told a judge they had come to believe he was innocent.

The payout to Willie Veasy, which city officials said they agreed to in May, is the latest in a series of multimillion-dollar settlements the city has reached in recent years involving overturned murder convictions. And it is another example of a suit in which an exoneree who spent decades behind bars has said that detectives in the 1990s bolstered a weak investigation by coercing a false confession and illegally withholding evidence beneficial to the defense.

By agreeing to settle Veasy’s lawsuit, the city will avoid having to litigate those claims at a potential civil trial. A city spokesperson declined to explain the decision to resolve Veasy’s case beyond saying: “The administration is committed to fairness in the criminal justice system”

Veasy’s attorney, Paul Messing, said: “We’re very pleased that this matter was amicably resolved, and that it will enable Mr. Veasy to get on with his life, which had been so horribly impacted.”

Since 2018, Philadelphia has agreed to spend nearly $40 million of taxpayer money to resolve lawsuits filed by people who served decades behind bars before being exonerated. Veasy is the fifth to receive a payout of at least $4 million. Dozens of other exonerees in recent years have filed similar suits against the city or are within the statute of limitations to do so.

Several of those cases are connected to the same former detectives Veasy and his lawyers accused of “extraordinary misconduct” — including Martin Devlin, Paul Worrell, Frank Jastrzembski, and Manuel Santiago.

The District Attorney’s Office in 2019 disclosed that it was reviewing cases tied to Devlin and Worrell over accusations that they had employed coercive tactics to secure false confessions in murder investigations.

Last year, prosecutors said Santiago was involved in a conviction that they helped overturn, casting that case as a problematic example of law enforcement breaking the rules and advancing flawed cases to arrest suspects.

Jastrzembski, Devlin, and Santiago were also accused of fabricating evidence to support the arrest of Anthony Wright, who was convicted in 1993 of raping and murdering his elderly Nicetown neighbor — in part due to a supposed confession Wright gave to Devlin. Wright said Devlin wrote the statement and beat him until he signed it. He was acquitted at a retrial in 2016 after his appellate lawyers uncovered DNA evidence pointing to a different suspect.

The officers have denied wrongdoing. And in Veasy’s case, attorneys for the city Law Department denied every allegation of misconduct contained in his complaint.

Veasy was convicted in 1993 of shooting John Lewis to death on a North Philadelphia street corner the previous year. At trial and throughout his appeals, Veasy maintained that he was working at the time of the shooting at a Houlihan’s restaurant in Jenkintown — a 20-minute drive away.

His conviction was based in part on a confession detectives said he gave. But in his civil suit, Veasy accused Devlin, Worrell, and Edward Rocks of interrogating him for hours on a day when he was sleep-deprived and hung over, six months after the murder. He said the officers threatened him, slapped him in the face, and attempted to kick him in the groin as he told them he wasn’t involved in the shooting.

Veasy, in his suit, said the detectives ultimately persuaded him to sign a document that he thought was a statement explaining his denial. But he said he never read the paperwork because the officers told him he could go home afterward. According to Veasy’s suit, the document turned out to contain a confession, which his lawyers called “a fabrication.”

Veasy also accused the police of failing to disclose information that cast doubt on the reliability of a key witness’ testimony, including tips that pointed to other suspects. By law, such information must be turned over to defense lawyers before trial.

In 2019, nearly three decades after Veasy was convicted of second-degree murder, a judge agreed to overturn the verdict after the Conviction Integrity Unit in the District Attorney’s Office said it had come to believe that Veasy’s confession was coerced and he was not guilty.

District Attorney Larry Krasner said at the time: “Innocent people shouldn’t be sitting in jail cells. It’s not that hard. The system should be just. It should be fair.”

Nilam Sanghvi, legal director for the Pennsylvania Innocence Project and one of Veasy’s appellate attorneys, said the resolution of such legal proceedings can never provide full closure, but she hoped it might help Veasy navigate the next chapter of his life outside of prison, which she said “can be just as hard as the wrongful conviction journey.”