Last June, District Attorney David Capeless of Berkshire County, Massachusetts, announced that he was dropping all charges against 44-year-old Bernard Baran, a man who has spent half his life behind bars on child molestation charges that the state no longer has the confidence to retry.

Baran was convicted in January 1985 of molesting six children at a pre-kindergarten day care facility in Pittsfield, Massachusetts. He was released on bond in 2006 after an appeals court determined that his trial attorney had been incompetent and that the prosecution may have withheld key exculpatory evidence. Baran says that during his jail term he was raped and beaten more than 30 times, necessitating six different transfers to new correctional institutions. Such is the cost the prison system exacts on an openly gay man convicted of molesting children.

Baran was one of the first people in the country to be prosecuted in the day care sex abuse panic of the 1980s, a bizarre nationwide hysteria fed by homophobia, fears of Satanism, and a wing of child psychology that used unproven interrogation techniques that critics say caused children to recount sexual incidents that never took place.

In this case, prosecutor Daniel Ford, now a judge on the Massachusetts Superior Court, showed the grand jury that indicted Baran an edited video interview with the children. According to court documents, the video shows several kids alleging that Baran had sexually abused them. Edited out was footage in which some of the children denied any abuse by Baran, interviewees accused other members of the day care faculty of abuse or of witnessing abuse, and, most important, interrogators asked the same questions over and over—even after repeated denials—until a child gave them an affirmative answer. Some children were even given rewards for their answers.

Withholding the unedited video from the grand jury was itself an act of misconduct. An appeals court suggested that prosecutor Ford may also have withheld it from Baran's trial attorney. We can only say "may" because there has never been a hearing on the issue, and Baran's trial attorney was far from competent. (Judge Ford did not respond to multiple requests for comment.) In granting Baran a new trial in 2006, Massachusetts Superior Court Judge Francis Fecteau never moved beyond the inadequacy of Baran's lawyer. When the case reached the state appeals court, the justices not only upheld Fecteau's ruling; they looked more closely at Ford's possible misconduct. "While the record does not settle the question whether the unedited videotapes were deliberately withheld by the prosecution," the ruling said, "there are indications in the trial transcript consistent with that contention."

The court further noted that it took years for Baran's appellate lawyers to get prosecutors to turn over the unedited tapes. It also cited other examples of Ford's failure to turn over exculpatory evidence, including evidence that two of the children who accused Baran may have suffered prior sexual abuse.

To make matters worse, the case against Baran was awash in homophobia. According to court documents, the first parents to come forward with accusations against Baran in September 1984 had just days earlier registered a complaint with the center that Baran was "queer." The boy's mother, who thought gays "shouldn't be allowed out in public," much less permitted to work at day care centers, said she "didn't want no homo" watching her son.

When that child later tested positive for gonorrhea of the throat, Ford used the test against Baran at trial, even though a) the child never accused Baran of forcing him to perform oral sex, b) the child, in fact, specifically denied having sexual contact with Baran on the witness stand, c) Baran tested negative for gonorrhea, d) the boy had told his mother two months prior that his stepfather had orally raped him, and e) on the very day Baran was convicted, charges against the stepfather were turned over to the district attorney's office for possible prosecution. Baran's counsel was never informed of the allegation against the stepfather. Addressing the gonorrhea issue in his closing arguments, Ford implied that Baran's "lifestyle" made it probable that he contracted gonorrhea at other times and knew how to quickly eradicate it to cover his tracks.

In his closing argument, Ford likened Baran at a day care center to a "chocoholic in a candy store," hypothesizing that in the "five or 10 minutes" he was able to be alone with a child without being seen by other staff or children, Baran "could have sodomized and abused those children whenever he felt the primitive urge to satisfy his sexual appetite." The appeals court that eventually overturned the conviction ruled that the incompetence of Baran's counsel "facilitated the speculative, stereotypical, and deeply insidious links between homosexuality, gonorrhea, and child molestation."

According to an affidavit signed by Baran's boyfriend at the time, Ford spent an inordinate amount of time asking Baran's boyfriend about his own sex life, employing variations of the word faggot and a mocking, drawn-out pronunciation of homosexual. Baran's boyfriend also claims he was pulled over by police officers and further harassed on a daily basis, and that Ford told him, illegally, that if he spoke with Baran or Baran's defense attorney he would be arrested.

In upholding the ruling that granted Baran a new trial, the appeals court added in a footnote that if the state wanted to retry him, Baran could file a motion for a hearing on Ford's alleged misconduct. By dropping the charges, the D.A. avoided that hearing. "In my opinion," says Boston civil liberties attorney Harvey Silverglate, " the possibility of an embarrassing hearing into misconduct by a former prosecutor and now sitting Superior Court judge was the main reason, if not the reason, they decided to drop the charges. The appeals court opinion cut a bit too close to the bone for them."

So while Bernard Baran is free after 22 years of incarceration, there are no plans to look into the actions of the prosecutor, now a sitting judge, responsible for his conviction. Ford's career trajectory indicates the backward incentive structure that prosecutors face: Convictions produce rewards, while abuse rarely comes with a penalty.

Baran has said he isn't sure he wants to endure a lawsuit, but even if he did, he would be unlikely to get to Ford. Prosecutors enjoy absolute immunity from civil rights lawsuits, even in cases of misconduct that lead to false convictions. They are rarely disciplined in other ways either. Courts and bar associations tend to avoid professional sanctions. A study released earlier this year by the Justice Project, a pro-defense advocacy group, concluded, "Despite the prevalence of prosecutorial misconduct all over the country, states have consistently failed to investigate or sanction prosecutors who commit acts of misconduct in order to secure convictions."

The only way Ford's actions in the Baran case might be examined would be for one of the state's legal ethics boards to open an investigation, either on its own or in response to a complaint. In a September article in Massachusetts Lawyers Weekly, a spokesperson for the state's Office of Bar Counsel said that of the 1,000 or so complaints the office investigates each year, just "nine or 10" involve the state's prosecutors.

One Ford defender told the publication that it's unfair to hold the judge accountable for something he did a quarter century ago. But it isn't as if this is some musty, inconsequential case pulled from the depths of a Massachusetts courthouse. There's fresh damage here. Ford's successors spent 25 years defending his misconduct. And Bernard Baran spent that time paying for it.

Radley Balko (rbalko@reason.com) is a senior editor at reason.