On Jan. 18, 1982, Dorothy Edwards, a well-to-do widow living in Greenwood, S.C., was found murdered in her home. Suspicion fell upon Edward Elmore, a 22-year-old black man of limited intelligence and troubled circumstances, who had cleaned out her gutters the previous week. After a short trial, Elmore was convicted and sentenced to death.

This crime and the legal proceedings that follow offer Raymond Bonner, a former attorney and newspaper reporter, the opportunity to explore the likelihood that Elmore was a victim of the court system's rush to judgment. Elmore had no apparent motive. No weapon was found upon him. Only a single fingerprint established his presence at the house at all (a print left, perhaps, when he came to collect the check for his work).

Bonner's larger subject, as the book's title suggests, is how Elmore and many defendants in similar circumstances are betrayed by the legal system. In a painstaking analysis of procedural misconduct, the author anatomizes how at every level this system failed Elmore. Official photographers documented every part of the Edwards house except the bed where Edwards supposedly was killed. The police mishandled certain pieces of evidence, and withheld much of it from the defense for 17 years while a series of appeals tried to win Elmore a new trial. Despite the dearth of incriminating evidence, Elmore was the only suspect -- yet the neighbor who found the body, a white "pillar of the community" who had motive and opportunity, was never considered.

At the heart of Bonner's indictment of judicial malfeasance is the notion that "the duty of the prosecutor is not to obtain a conviction but to do justice," an idea too often neglected by Greenwood's prosecutors and judges, who appear to place their careers above all else.

Nor does Elmore's court-appointed defense team do him any favors. According to Bonner, one comes to court every day smelling of whiskey, while the other is an outspoken racist. They call no witnesses except Elmore himself, and both admit that they believed their client committed the crime.

The star of "Anatomy of Injustice" is Diana Holt, a Texan attorney whose own upbringing was a nightmare of sexual abuse, drugs and early pregnancies. Yet her resilience leads her to champion Elmore for decades, to interview witnesses, to write numerous briefs and ultimately to get Elmore's death sentence commuted.

Bonner's work offers a seminar on capital punishment and the politics of incarceration. After a "fair trial, the presumption of innocence disappears," and all the cards belong to the state. It is extremely difficult to win a new trial even if (I was surprised to learn) another person confesses to the crime. While Holt uncovered all sorts of evidence that undercut the logic of Elmore's conviction, she made little headway in clearing her client.

Elmore was set free March 2 after taking an "Alford plea," a guilty plea where the defendant does not admit the crime.

My sole reservation about this generally impressive book is that Bonner's thorough arguments would be more convincing if he tempered his extreme dislike of the South. Yes, South Carolina's atmosphere of racial intolerance and religiosity clearly played a part in Elmore's death sentence, and Bonner has a lot to say about this. But why couldn't the author resist the urge to make fun of the Greenwood prosecutor's thinning hair?

Tom Zelman teaches English at the College of St. Scholastica in Duluth.