A man who spent nearly 30 years on Alabama's death row was freed Friday after prosecutors finally acknowledged that the only evidence they had against him couldn't prove he committed the crime.

Ray Hinton, 58, walked out of the Jefferson County Jail in Birmingham and hugged his tearful family members. "Thank you Lord, thank you Jesus said his sister, Darlene Gardner, as she embraced him.

"I shouldn't have sat on death row for 30 years," Hinton told reporters. "All they had to do was test the gun."

Hinton was convicted of the 1985 murders of two Birmingham fast-food restaurant managers. Crime scene bullets were the only evidence linking him to the crime.

The U.S. Supreme Court ruled last year that Hinton had "constitutionally deficient" representation at his initial trial because Hinton's defense lawyer wrongly thought he had only $1,000 to hire a ballistics expert to try to rebut the prosecution testimony about the bullets. The only defense expert willing to take the job at that price struggled so much to answer questions on cross-examination that jurors chuckled at his responses.

Attorney Bryan Stevenson, director of the Alabama-based Equal Justice Initiative, said he was quickly able to independently re-test the gun and prove there was no match to the fatal bullets after taking on the case 16 years ago.

He pressed the state ever since to re-examine the evidence, but officials refused. Only while preparing for a retrial did the state test the bullets again, failing to prove a link to Hinton's mothers revolver. Only then did they move to dismiss the case.

"He was convicted because he was poor," Stevenson said outside the jail.

Hinton said he would continue to pray for the victims' families, since the state miscarried justice for them as well.

"They had every intention of executing me for something I didn't do," Hinton said.