For 30 years, Ken Anderson was the face of law enforcement in Williamson County, Texas, first as a bearded district attorney asking the court for tough sentences, and for the last 10 years handing those kinds of sentences out as a judge.

Earlier this month, his beard gone, his hair white, Anderson, noted for his talks to school children about the criminal justice system and the dangers of drugs, walked into the courthouse again, this time as a defendant. He had come to turn himself in, be fingerprinted, photographed and post $2,500 bail. A few hours earlier a judge had ordered his arrest.

Not for drunk driving or speeding, or any other of the pedestrian crimes that sometimes fell public officials. Instead, Anderson was the rarest of defendants, a prosecutor criminally charged for his role in having helped send an innocent man to prison.

In one of Anderson's most notorious murder cases — the conviction of Michael Morton for killing his wife — he withheld critical evidence that would have been essential to Morton's defense.

Morton spent 25 years in prison before gaining his release. Anderson, once named the Texas Prosecutor of the Year, now faces 10 years in prison for his part in Morton's wrongful conviction.

The judge who oversaw a Court of Inquiry investigation of Anderson's conduct did not spare the former prosecutor.

"The court cannot think of a more intentionally harmful act than a prosecutor's choice to hide mitigating evidence so as to create an uneven playing field for a defendant facing a murder charge and a life sentence," said Judge Louis Sturns.

Anderson's lawyer has filed an appeal, arguing that the statute of limitations bars any action.

In Williamson County, the charges have shaken Anderson's friends and colleagues.

But Judge Sturns's action is even more remarkable when set against the long and often ugly history of prosecutorial misconduct. Even when prosecutors engage in strikingly unethical behavior, they are rarely sanctioned for it, much less criminally charged.

George Kendall, a veteran defense lawyer who has specialized in death penalty prosecutions, called the Anderson case "unprecedented."

Prosecutors and defense lawyers disagree on whether prosecutorial misconduct is widespread, or instead limited to isolated transgressions by inexperienced or overzealous prosecutors.

However, one thing is abundantly clear: While revelations of misconduct might result in people being freed from prison or granted new trials, action is almost never taken against the offending prosecutors.

An investigation by ProPublica found 30 cases in New York in recent years where convictions had been overturned because of prosecutorial misconduct. Yet in only one instance was a prosecutor punished in any meaningful way.

In fact, many of the New York prosecutors found to have withheld evidence and accepted false testimony were promoted, or received raises, even after courts overturned convictions because of their misconduct.

In one case, a Queens man was sent to prison for raping his 4-year-old daughter even though the prosecutor had evidence showing the child hadn't been sexually abused. After spending nearly two years in prison, the man's conviction was overturned. A judge later ruled that what the prosecutor had done was "tantamount to fraud." But after the conviction was overturned, the prosecutor received a raise and became head of a department where she oversaw and guided young assistant district attorneys.

In California, "prosecutors continue to engage in misconduct, sometimes multiple times, almost always without consequence," according to a study by the Northern California Innocence Project and Santa Clara University School of Law. In some 600 cases in which courts found there had been prosecutorial misconduct, the study found, only six times did the State Bar discipline the prosecutor

In Virginia, four murder convictions have been overturned within the last year because of prosecutorial misconduct, according to The Open File, a website launched last year "to monitor prosecutorial misconduct and accountability." None of the prosecutors have been sanctioned.

Twenty-six years ago in Texas, Michael Morton was charged with bludgeoning his wife to death with a club while she lay on the couple's waterbed.

During Morton's trial, Anderson put on an emotional case, shedding tears in court and graphically depicting Morton's alleged crimes. His theory of the case was that Morton had become enraged after his wife had denied him sex the previous night, which had been his birthday. For good measure, Anderson told the jury that Morton had masturbated on his dead wife before he headed off to work as a manager at the nearby supermarket.

The jury deliberated less than two hours before finding Morton guilty; he was sentenced to life in prison.

It is now charged that Anderson won his conviction corruptly, failing to comply with the law as laid down by the United States Supreme Court: Anderson had withheld from Morton's lawyers documents that indicated their client was innocent.

Anderson failed to turn over the transcript of an interview in which Morton's young son told his grandmother that a "monster" had killed his mother and that his father had not been at home, and a police report that a green van had been seen near the home and that a strange man had walked into the woods behind the house around the time of the murder.

Morton had been in jail 15 years when one of his trial lawyers contacted Barry Scheck, who had used his fame and money from the O.J. Simpson trial to expand the work and visibility of the Innocence Project. Scheck assigned the case to Nina Morrison, a bright, tenacious young lawyer then new to the office, but who has in the last decade secured the release of more than a dozen men from prison based on DNA testing.

The Innocence Project works with local lawyers, and Morton was fortunate that John Raley, a highly regarded civil litigator in Houston, agreed to represent him pro bono.

Morton's new lawyers quickly moved to request DNA testing on a bloody bandana that had been found at a construction site 100 yards from Morton's house. The state resisted, and a court denied the request; but Morrison persisted, and eventually a court ordered DNA testing.

The bandana was found to contain the blood of Morton's wife and the DNA of an unknown individual. That individual was later identified as Mark Alan Norwood, whose DNA was found in a national database; he was convicted of the murder and sentenced to life in prison last month.

DNA testing was not as advanced at the time of Morton's trial, and there was no serious criticism of Anderson for not having considered the bandana more carefully. But that was not the end of the case

Using the state's public records act, Morrison had sought documents from the district attorney's office. After years of litigation, what she obtained was explosive.

Foremost among the documents was an eight-page transcript of an interview of the victim's mother by a police officer, an account that suggested Morton could not have been the killer. There was also a sheriff's report about the strange man seen in the neighborhood around the time of the killing.

Anderson had kept all of this from the defense. With Morton out of prison, and fully exonerated, his lawyers might have stopped there. But they pushed on.

An obscure 1876 Texas law provides for a Court of Inquiry when there is probable cause to believe that "an offense has been committed against the laws of this State." Such courts have been used to investigate cases of wrongful convictions, but never allegations of prosecutorial misconduct.

Morton's lawyers persuaded a judge that this was a proper case for a Court of Inquiry. Their legal arguments were buttressed no doubt by the extraordinary public attention paid to the Morton case: Pamela Colloff had authored a two-part series, "The Innocent Man," which appeared in The Texas Monthly; there had been an editorial in The New York Times; 60 Minutes and National Public Radio had also weighed in.

Appointed as the special prosecutor for the Court of Inquiry was Rusty Hardin, who had been a legendary Houston district attorney — "one of the most feared death penalty prosecutors in Texas," says George Kendall.

During the hearing before Judge Sturns in February, Anderson, 60, was grilled for several hours by Hardin. Anderson defiantly defended his actions, "discounted the importance of the inquiry itself, struck a sarcastic tone, and cast himself as the victim of a 'media frenzy,'" Colloff reported.

He also suffered memory lapses. He routinely turned over all evidence to the defense that he was required to, he testified. But he had "no independent memory" of having given the defense the interview in which Morton's young son told his grandmother that a monster had killed his mother.

How could Anderson not remember a statement by a child seeing his mother killed? Hardin demanded to know.

"I have no recollection of it," Anderson repeated. Besides, he said, he'd put no credence in what a little boy said.

It is hard to overstate the uniqueness of the inquiry into the prosecutor's actions in the Morton case, and the subsequent legal action against Anderson.

One way to appreciate its novelty is to recall the South Carolina case of Edward Lee Elmore. A semi-literate African-American, Elmore was convicted and sentenced to death for the sexual assault and murder of a 75-year-old white woman.

In Elmore's case, the prosecution didn't just withhold critical information from the defense. There is reason to believe that the police and investigators concocted evidence, and that they committed perjury.

For instance, at Elmore's trial, officers testified that more than 40 of Elmore's pubic hairs had been found on the bed where he was alleged to have sexually assaulted the victim.

But the claims, as well as others involving what was once presented as scientific evidence of Elmore's guilt, ultimately crumbled upon re-examination. And some potentially exculpatory evidence was withheld from Elmore's lawyer.

Elmore was approaching 30 years in prison — more than half his life — when the Fourth Circuit Court of Appeals issued an opinion. It is striking for its length — 194 pages — but even more so for the majority's scathing criticism of the state's handling of the case. There was "persuasive evidence," the court held, that investigators "were outright dishonest," and that they "lied about" some of their investigative findings at the time of Elmore's trial.

That judgment was rendered more than 18 months ago, and Elmore was released shortly afterward. But there is no indication of any investigation into the police or prosecutors involved in the case.

Raymond Bonner, a lawyer and former New York Times reporter, is the author of "Anatomy of Injustice: A Murder Case Gone Wrong."