A New York City man who spent more than 25 years behind bars for rape and robbery has been set free after prosecutors on Wednesday asked to vacate his conviction because he had been falsely identified.

Mark Denny was convicted in 1989 of a rape and robbery after three men broke into a closed Burger King, assaulted an 18-year-old worker and robbed the store of $3,000. He had been identified as a suspect after an unrelated arrest months after the attack. The victim at first did not identify him but later picked him out of a lineup.

The case is the 24th conviction that the Brooklyn district attorney's office has disavowed in the last 3½ years, as it revisits over 100 convictions in one of the most sweeping reviews of its kind nationwide. Some of those cases were handled by a once-prominent detective whose tactics are under renewed scrutiny.

District Attorney Eric Gonzalez said this case was not the fault of law enforcement, "but happened because little was known back then about memory retention and retrieval, and their effect on eyewitness identification."

Gonzalez sought the help of a psychology professor who specializes in the reliability of eyewitness identifications. She said the victim had a limited chance to see her attackers because she had cloth tied around her eyes for part of the crime. That fact, plus the extreme stress of the attack and the long period until identification of suspects, could have contributed to false identification.

Denny, who was 17 at the time, was sentenced to 19 to 57 years. He maintained his innocence and refused to participate in a sex offender program. He was granted parole in October but no date had been set for his parole.

According to the Daily News of New York, one of the other three defendants was convicted and sentenced to 16 to 48 years and was paroled in 2015. Another's case was dismissed at a second trial because the victim was emotionally unable to testify. A third pleaded guilty. Those convictions have not been questioned.

Denny was released from prison last week but appeared before a Brooklyn judge to have the case formally dismissed.

"Mr. Denny has been waiting for this day for a very long time," said Nina Morrison, senior staff attorney for the Innocence Project, praising the work of the district attorney's office.