DALLAS (AP) — A Texas man who spent 30 years in prison after being accused of raping and robbing a Dallas woman has been declared innocent.

Judge Don Adams set aside Cornelius Dupree Jr.'s aggravated robbery with a deadly weapon conviction Tuesday in a Dallas courtroom. Prosecutors said Monday that a DNA test excluded Dupree as the person who assaulted the woman in 1979.

Dupree is the longest-serving inmate exonerated by DNA evidence in Texas, which has freed 41 wrongly convicted prisoners through DNA since 2001 — more than any other state.

The Innocence Project says that nationally, two men freed by DNA served longer sentences.

Dupree was sentenced in 1980 to 75 years in prison. He's been free on parole since July. Dallas County's district attorney supported his innocence claims.