During his nearly two decades in prison on a rape conviction, Thomas A. Doswell (search) was denied parole four times because he refused to accept responsibility for the crime.

But DNA evidence (search) has finally proved what he's been saying all along: He didn't do it.

"I'm thankful to be home," he told The Associated Press from his mother's house Monday, after walking out of the county jail a free man. "I'm thankful justice has been served. The court system is not perfect, but it works."

Doswell, 46, was convicted in the 1986 rape of a 48-year-old woman at a hospital in Pittsburgh. He was sentenced to 13 to 26 years in prison. At the time, he was the father of two young children.

A judge Monday dismissed the charges as friends and family broke into applause.

Prosecutors originally opposed DNA testing for Doswell, but a judge ordered it. When the tests came back last month showing that semen taken from the victim was not from Doswell, prosecutors filed motions to vacate his sentence and release him.

"These tests confirmed what Mr. Doswell has been saying from the moment he was charged, that he was innocent and that this was a misidentification brought about by police officers who may have engaged in misconduct," said Colin Starger of the Innocence Project (search) at the Benjamin N. Cardozo School of Law at Yeshiva University in New York. The project helped push for Doswell's release.

The victim and another witness had picked out Doswell's photo from a group of eight shown to them by police.

At the time, Pittsburgh police identified mug shots of people charged with rape with the letter "R." Doswell insisted witnesses identified him as the rapist only because "R" appeared under his mug shot.

According to the Innocence Project, his photo was the only one with an "R."

His photo was marked because an ex-girlfriend had accused him of rape, but he was acquitted of that charge. Police officials say they no longer mark photos of rape suspects with an "R."

Authorities plan to compare the DNA sample taken from the victim with national databanks, but so far do not have any suspects.

Although Doswell spent nearly two decades in prison, neither he nor his family said they were angry.

"I couldn't walk around with anger and bitterness," said Doswell, speaking on a cell phone for what he said was the first time. "It would have done me more harm than good."

Doswell spent his years in prison getting an associate's degree, learning to speak Spanish and mastering seven musical instruments, including the guitar, saxophone, flute, drums and trumpet.

"I am so happy to be actually seeing him at home instead of in jail," said Crystal Glover, Doswell's girlfriend. "Now we can get on with our lives."