A mentally ill New York man who spent nearly six years behind bars for a 1976 rape he insisted he didn't commit was exonerated Thursday after DNA testing showed he was innocent.

The conviction of Freddie Peacock of Rochester, now 60, was based on a false confession police attributed to him just hours after the early morning rape of a 24-year-old woman who lived in the same apartment building.

State Judge David Egan vacated the conviction after lawyers for Peacock and Monroe County prosecutors agreed DNA evidence obtained from the victim's underwear and from Peacock in 2008 proved he wasn't the rapist.

During the brief proceeding, Peacock sat expressionless in the courtroom. He declined to talk afterward to reporters. But his elder sister cried when the judge threw out the conviction.

"It's been a long time coming," said Edith Leonard. "He talked about it all the time, just wouldn't let it go. He kept writing letters (and) finally found somebody to come to his rescue. I'm just happy today because it took a lot out of our family."

Convicted in December 1976, Peacock drew a 20-year prison sentence. He was released on parole in May 1982. He contacted the Innocence Project in 2002 and the New York City organization agreed to take his case.

Peacock has suffered from unspecified psychiatric problems since his teens. Olga Akselrod, an attorney for the Innocence Project, said he suffers from "a serious mental illness that is quite debilitating." She declined to be more specific. Peacock spends much of his time working as a volunteer at a church.

Peter Neufeld, the Innocence Project's co-director, said that with Peacock's exoneration, "New York becomes the nation's capital of false confessions."

Since 2002, 10 people in New York have been exonerated through DNA testing after false confessions or admissions led to wrongful convictions. That accounts for one-third of all DNA exonerations nationwide since 2002, the group said.

Peacock was the 250th person in the nation whom it has helped exonerate through post-conviction DNA testing since 1989.

"Freddie didn't just happen to get wrongly convicted," Neufeld said. "It doesn't work that way. There were two police officers that questioned him and attributed a statement to him, 'I did it' — a bare bones confession at best."

The statement wasn't written down, videotaped, audiotaped or "recorded in any way and he didn't sign anything," Neufeld said in calling for mandatory recording of all serious crime interrogations in New York.