RICHMOND, Va. — A federal judge has overturned a man’s capital murder conviction in the 1996 slaying of an elderly Culpeper woman.

U.S. District Judge James C. Turk ordered (PDF) that Michael Wayne Hash either be retried within six months or released.

Turk’s Tuesday ruling cited prosecutorial misconduct and said Hash’s trial lawyers failed to provide an adequate defense.

Turk wrote that he’s disturbed by what he called a miscarriage of justice in the case.

Hash was one of three people charged in the death of 74-year-old Thelma Scroggins. The retired mail carrier was beaten and shot in her home.

Hash was 15 at the time of the slaying. He was convicted in 2001 and sentenced to life without parole.

One co-defendant was acquitted and the other pleaded guilty to second-degree murder.

Read more: The Post’s crime coverage