The Virginia Supreme Court on Tuesday officially exonerated a man who was convicted of a 1979 rape in Newport News that DNA evidence proved he did not commit.

Calvin Cunningham, 58, served more than seven years in prison for the rape. The court granted him a “Writ of Actual Innocence.”

Cunningham is incarcerated in a Virginia prison on unrelated charges, including larceny.

Cunningham had consistently claimed his innocence in the rape. At his 1981 sentencing hearing, he told the judge: “As I stand here, as God be my witness, I’m innocent, and if I be sentenced to the penitentiary, I’m being sentenced for something I ain’t do.”

In 2005, in the wake of the exonerations of five other wrongly convicted men, then-Governor Mark R. Warner (D) ordered a sweeping review of thousands of criminal cases from 1973 through 1988. Cunningham’s case was examined and the tests eliminated him.

The victim in the rape had identified Cunningham as her attacker and testified that he lived next door in the same apartment complex.

The woman, who had fallen asleep while watching television, was attacked early on the morning of May 24, 1979, by a man who apparently climbed into her apartment through an open window.