Susan Mellen
© Associated Press/Brad GraversonSusan Mellen, left, sits with her attorney Deirdre O’Connor, as she is exonerated of murder
A woman who spent 17 years in prison after being convicted of murder in the death of a homeless man was exonerated Friday by a Los Angeles County judge who said she should not spend another minute behind bars.

The courtroom burst into applause after superior court judge Mark Arnold overturned the conviction of Susan Mellen, who was to be processed for release from the courthouse.

Mellen had entered the courtroom in tears, and her children also wept.

The judge said that in Mellen's case the justice system failed and she had inadequate representation by her attorney at trial.

"I believe that not only is Ms Mellen not guilty, based on what I have read I believe she is innocent," Arnold said. "For that reason I believe in this case the justice system failed."

Mellen's case was investigated by Deidre O'Connor, head of a project known as Innocence Matters, which seeks to free people who are wrongly convicted.

O'Connor said in an earlier interview that she discovered that Mellen was convicted of the 1997 killing based solely on the testimony of a notorious liar.

Mellen, a mother of three, was sentenced to life in prison without possibility of parole.

The witness who claimed she heard Mellen confess was June Patti, who had a long history of giving false tips to law enforcement, according to documents in the case. She died in 2006.

Three gang members subsequently were linked to the crime, and one was convicted of the killing. Another took a polygraph test and said he was present at the bludgeon killing of Richard Daly, and Mellen was not there.

In a petition, O'Connor said the police detective who arrested Mellen was also responsible for a case in 1994 that resulted in the convictions of two men ultimately exonerated by innocence projects.

It said the primary evidence against Reggie Cole and Obie Anthony was the false testimony of an informant who avoided prosecution for other charges in exchange for his help.