BROOKLYN, N.Y. (PIX11) — A 50-year-old man who spent 19 years in prison for a killing he insisted his friend committed had his conviction vacated during a proceeding in Brooklyn Supreme Court on Thursday.

A jury convicted Emel McDowell of murder in connection to the fatal shooting of 19-year-old Jonathan Powell in Bedford-Stuyvesant, Brooklyn, in 1990, but McDowell maintained his innocence while fighting for his freedom from behind bars, according to the Brooklyn District Attorney’s Office.

“I’m great, feeling great,” McDowell told reporters after the proceeding.

An investigation by the Conviction Review Unit (CRU) substantiated McDowell’s claim that someone else pulled the trigger, officials said. Investigators said they interviewed the former friend, who admitted that he shot Powell in self-defense and that McDowell was not armed that night.

“Our legal system failed Emel McDowell when he was wrongfully convicted of murder in 1990 and his release years later was conditioned on an admission to a crime he did not commit. A full reinvestigation by our Conviction Review Unit confirmed that another individual fatally shot the victim, as Mr. McDowell has consistently maintained, and today we will ask to give him his good name back,” Brooklyn District Attorney Eric Gonzalez said.

Powell was fatally shot during a fight at a party on Oct. 27, 1990. McDowell told police in his statement shortly after the incident that his friend was the shooter. But McDowell was the only one who went to trial and was later convicted of murder and sentenced to 22 years in prison, authorities said.

In 1991, the former buddy sent McDowell a letter saying, “I don’t think I deserve to walk the face of the earth because one of my friends is locked up, for something that he didn’t do,” according to prosecutors.

In 2007, McDowell submitted the letter and six affidavits from other witnesses in a motion to have his conviction set aside. Authorities said McDowell got a new hearing and prosecutors offered a manslaughter plea deal, allowing him to be released almost immediately.

McDowell accepted the plea deal because he didn’t want to spend any more time in prison, but his lawyers asked the CRU to re-open the case to clear his name. The CRU then determined that police botched the initial investigation, officials said.