Terrance Lewis, who was arrested as a teenager and sentenced to life without parole for murder, was released from the State Correctional Institution Chester in May at age 40, his conviction vacated after 21 years in prison.

Walking out the door, going from caged to free, was simple. “I can wake up and go to sleep when I want. I can walk anywhere I choose to. I can eat what I want to eat,” he said recently. Everything else has been more complicated. “The transition, as far as mentally coming from that subculture to here, things are different. Living life is totally different.”

As Lewis works to build a life for himself, he also wants to hold the city accountable. On Friday, he filed a lawsuit documenting allegations of wide-ranging police misconduct, including coercing witnesses, hiding evidence, and testifying falsely. The complaint, filed in U.S. District Court for the Eastern District of Pennsylvania, draws on a police homicide file opened to Lewis and his lawyers in 2017 that for the first time offers an alternative explanation for how he was implicated and convicted.

“That was the question for me: ‘Why me?’” Lewis said. “Now, it’s clear.”

According to the lawsuit, the investigation of the murder of Hulon Bernard Howard by three men in his West Philadelphia home on Aug. 6, 1996, was flawed from the start. A neighbor described to police a man who had been looking for Howard, intent on settling a drug debt, the day before the murder, and said the man’s car remained parked outside Howard’s house. The car was never secured, though, and the tip never investigated, according to the complaint.

Detectives interviewed Howard’s girlfriend, who had witnessed the crime. They never followed up on portions of her story, according to the lawsuit, and concealed her contradictory statements about whether one of the assailants had fired a shotgun into the ceiling (there was no bullet hole), where Howard was shot, and who was present.

Defense lawyers never knew about any of that — nor were they aware that the girlfriend had actually identified a different man known as Stink, which was also Lewis’ childhood nickname, as one of the killers. She gave them a name and description, noting that the man was wearing a house-arrest bracelet, according to the complaint. But police pursued Lewis instead, using a photo from his high school yearbook to make up a photo array.

“The defendant detectives intentionally and maliciously suppressed these statements … in an attempt to secure a conviction while complete[ly] disregarding Mr. Lewis’ constitutional rights, causing his wrongful conviction and 21 years of wrongful incarceration,” the complaint alleges. The lawsuit, filed by Robert Ross and Kevin Harden Jr. of the firm Ross Feller Casey, argues that the misconduct was part of a broader departmental pattern.

The detectives named in the complaint, Thomas Kane and James Hughes, are not listed in recent Philadelphia police payroll records. The Police Department did not respond to a request for comment on the complaint or to confirm that they are no longer on the force.

Lewis fought his case through the court system for years, collecting statements from witnesses including one of his codefendants, Jehmar Gladden, and a woman who lived on the block, Kizzi Baker, who said he had not been at the scene. A decade ago, a federal judge held an evidentiary hearing and opined that Lewis was innocent, but concluded that technicalities of the law prevented her from granting relief.

The Philadelphia district attorney’s Conviction Integrity Unit took up the case in 2017; that’s when Lewis’ lawyers finally got access to the police file. But by this May, they still had not moved to vacate his conviction, so Lewis went to court for a different reason: The U.S. Supreme Court had found life sentences like his, automatically imposed on juveniles, were unconstitutional.

But Judge Barbara McDermott, who was scheduled to resentence him, reviewed the conviction and threw it out. The District Attorney’s Office said it would not retry the case, adding it had “determined that there has indeed been a miscarriage of justice.”

Another exonerated man, Anthony Wright, settled a lawsuit against the city for close to $10 million after 25 years in prison for a murder he didn’t commit. Eugene Gilyard and Lance Felder, who spent 16 years in prison before their names were cleared, agreed to accept $3 million between them last year.

Lewis, who was released with nothing but a prison-issue uniform he was eager to shed, is working toward landing a job, renting his own place, and enrolling in school. But so far he has little but donated suits from Menzfit and $7,948 raised through GoFundMe.

His complaint does not specify the damages sought, except to state that the amount exceeds $75,000.