John Miller looks on outside the SCI Mahanoy State Correctional Institution in Frackville, Pa. Wednesday, July 31, 2019. Miller spent more than two decades behind bars for a murder he didn't commit,  is a free man. The Philadelphia District Attorney's Office agreed with Miller's defense team that his prosecution was flawed and his conviction shouldn't stand.  (Jose F. Moreno/The Philadelphia Inquirer via AP)

FRACKVILLE, Pa. (AP) — A Philadelphia man who spent more than two decades behind bars for a murder he didn't commit is a free man — 17 years after another man confessed to the crime.

John Miller was released Wednesday after 22 years in prison. Surrounded by family outside the State Correctional Institution at Mahanoy, 100 miles north of Philadelphia, he said it felt "surreal."

In 1998, a jury found Miller guilty of second-degree murder in the shooting death of a man in a parking lot outside 30th Street Station two years prior, even though there was no physical evidence of his involvement.

The key witness against him confessed multiple times to being the real shooter and even sent a letter to Miller's mother apologizing for lying.

The witness, David Williams, recanted his statement at Miller's preliminary hearing in 1997 and denied it again at trial a year later, but the jury voted to convict Miller anyway.

In 2002, Williams wrote an apology letter to Miller's mother.

"I can't live with this on my conscience," Williams wrote, according to court documents. "Your son had no knowledge of this crime, he wasn't even there."

Prosecutors did not say Wednesday whether they planned to charge Williams, or if they believed his confession that he killed Anthony Mullen.

But none of it mattered, according to Miller's lawyers.

The courts denied Miller's appeals, citing procedural issues, and alleging that Williams was not believable when he denied his statement and admitted to the crime.

Miller, now 44, contacted the Pennsylvania Innocence Project about eight years ago to help with an appeal.

The Philadelphia District Attorney's Office has agreed with Miller's defense team that his prosecution was flawed and his conviction shouldn't stand.

On Wednesday morning, Common Pleas Court Judge Lillian Ransom granted Miller the relief he sought, leading to his release.

Miller said he's looking forward to eating steak and taking his niece to the zoo.

John Miller, center, smiles with his family, Velma Miller, left, mother, Kalita Miller, sister, and brother Lamont Washington, outside the SCI Mahanoy State Correctional Institution in Frackville, Pa. Wednesday, July 31, 2019.  Miller spent more than two decades behind bars for a murder he didn't commit,  is a free man. The Philadelphia District Attorney's Office agreed with Miller's defense team that his prosecution was flawed and his conviction shouldn't stand.  (Jose F. Moreno/The Philadelphia Inquirer via AP)
Lawyer Thomas M. Gallagher, left, hugs Kalita Miller, center, as family members of John Miller gather outside the Criminal Justice Center after learning of his release, in Philadelphia, Wednesday, July 31, 2019. The Philadelphia District Attorney's Office agreed with Miller's defense team that his prosecution was flawed and his conviction shouldn't stand.  (Jessica Griffin/The Philadelphia Inquirer via AP)
Velma Miller, mother of John Miller, holds her great grandson Caiden Miller, as John Miller, father of John Miller, back center, shakes hands with Lawyer Thomas M. Gallagher, right, as family members gather outside the Criminal Justice Center after learning of his release, in Philadelphia, Wednesday, July 31, 2019. The Philadelphia District Attorney's Office agreed with Miller's defense team that his prosecution was flawed and his conviction shouldn't stand.  (Jessica Griffin/The Philadelphia Inquirer via AP)