Three years ago, federal prosecutors likened McLean, Virginia, pain doctor William Hurwitz to "a street-corner crack dealer." But it turned out there were a few differences.

Unlike a street-corner crack dealer, Hurwitz did not sell drugs. Instead, he prescribed narcotics to patients, the vast majority of them undisputedly legitimate, in an attempt to relieve severe chronic pain. The small minority of patients who used the pills to get high or sold them on the black market also claimed to be suffering unrelieved pain, and Hurwitz said he believed them.

Prosecutors said none of this mattered—not because Hurwitz was lying (although they suggested he was) but because, even if he was completely on the level, even if he was making a conscientious effort to treat pain, he was still guilty of drug trafficking. A federal appeals court recently rejected this astonishing assertion, dealing a blow to prosecutions that seek to punish mistakes in medical judgment with prison terms.

The case against Hurwitz, who was convicted of 50 drug trafficking charges in December 2004 and sentenced to 25 years in federal prison the following April, encouraged doctors who already thought twice before helping patients in pain to think three or four times. Prosecutors argued that a physician who writes prescriptions in good faith can nevertheless be convicted of drug trafficking, and the judge instructed the jurors accordingly.

Consider for a moment what this position would mean if it were applied to other crimes. If you mistakenly picked up someone else's suitcase at the airport, you could be convicted of theft. If a child climbed into your cart at the supermarket, you could be convicted of kidnapping. If you accidentally killed a pedestrian who darted in front of your car, you could be convicted of murder.

Fortunately for Hurwitz, other doctors who treat pain, and the millions of patients who depend on them, a three-judge panel of the U.S. Court of Appeals for the 4th Circuit unanimously repudiated the Justice Department's concept of accidental drug trafficking. "A doctor's good faith in treating patients is relevant to the jury's determination of whether the doctor acted beyond the bounds of legitimate medical practice," the court ruled, vacating Hurwitz's conviction and ordering a new trial.

The government argued that even if the judge's instructions to the jury were incorrect, the error was "harmless" because it did not affect the trial's outcome. Yet Hurwitz's intent was the focus of his defense, and comments by the jury foreman after the trial indicated the jurors thought he was guilty of negligence at worst.

"Good faith was at the heart of Hurwitz's defense," the 4th Circuit noted. "By concluding that good faith was not applicable...and affirmatively instructing the jury that good faith was not relevant...the district court effectively deprived the jury of the opportunity to consider Hurwitz's defense."

The appeals court muddied the waters a bit by insisting on an "objective rather than a subjective standard for measuring Hurwitz's good faith." It's not clear exactly what that means.

Since a jury cannot see Hurwitz's thoughts, it obviously must rely on objective evidence of his good faith: Did he take medical histories and perform exams before prescribing painkillers? Did he consult with other doctors and make an effort to keep up on the latest developments in pain treatment? Did patients who were faking or exaggerating pain feel a need to lie and conceal?

The answer to all those questions is yes, strongly suggesting that Hurwitz prescribed painkillers in good faith. But if the "objective" standard demands more—if it requires not only that a doctor believe he is practicing good medicine but that he is in fact practicing good medicine--it treats malpractice as a felony rather than a regulatory violation or a tort.

Doctors who err on the side of trusting their patients already risk their licenses and their livelihoods. They should not have to risk their freedom as well.