A WOMAN who spent 17 years in a California prison for a murder she didn’t commit has been declared innocent, clearing the way for her to collect about $US600,000 ($A649,100) in compensation from the state.

Susan Mellen, 59, said she was “so grateful” for the ruling that came about six weeks after her conviction was overturned and she was released from prison.

“I feel really badly about what happened here,” Judge Mark Arnold said, according to City News Service.

Susan Mellen freed after 17 years in jail A woman who spent 17 years in prison for the death of a homeless man hjas been released after she was judged innocent of murder. Courtesy FOX11 News

Arnold overturned Mellen’s conviction over the 1997 beating death of a homeless man because she was poorly represented at trial and a woman who claimed to have heard Mellen confess was a habitual liar.

Mellen’s conviction over orchestrating the killing of Richard Daly was based on witness testimony.

Deputy District Attorney Loren Naiman, who didn’t handle the case at trial, said the incriminating testimony was doubtful and asked the judge to set aside the conviction.

Three gang members later were linked to the crime, and one took a lie-detector test and said Mellen wasn’t there.

Mellen’s case was taken up by Deirdre O’Connor, head of Innocence Matters, which seeks to exonerate the wrongly convicted. O’Connor said the detective who arrested Mellen also was responsible for a case in 1994 that resulted in two people later being exonerated.

The declaration of “factual innocence” is rare. It allows Mellen, who left prison broke, to claim $US100 from the state for every day she spent behind bars.

Mellen said she cried every night in prison but never lost faith she would be reunited with her three now-grown children. Her youngest kids were seven and nine when she was arrested.

Mellen scrawled the word “freedom” on the bottom of her shoes because she planned to one day walk free. On Friday, she was not only free, but innocent. AP/km