There are ways to prevent diversion without imprisoning doctors who have shown no illegal intent. They are increasingly used — but state authorities and doctors need to push even harder. The majority of states, South Carolina among them, do not yet have prescription monitoring — a central registry of prescriptions, which could help catch people getting opioids from several different doctors and pharmacies. Doctors should use more urine and blood tests, including screens that can tell quantities of drug present.

Last year, state medical boards took 473 actions against doctors for misdeeds involving prescribing controlled substances. In many cases, their licenses were pulled. Physicians can also lose their D.E.A. registration, and with it the right to prescribe controlled substances. A few dozen do every year, although there is considerable overlap with medical-board actions. Washington is the first state to recommend that only pain specialists handle high-dose opioids; other states are likely to follow.

But such guidelines are futile while there is one pain specialist for, at the very least, every several thousand chronic-pain sufferers nationwide. And even though pain is an exciting new specialty, doctors are not flocking to it. The Federation of State Medical Boards calls “fear among physicians that they will be investigated, or even arrested, for prescribing controlled substances for pain” one of the two most important barriers to pain treatment, alongside lack of understanding. Various surveys of physicians have shown that this fear is widespread. “The bottom line is, doctors say they don’t need this,” said Heit. “They’re in a health care system that wants them to see a patient every 10 to 15 minutes. They don’t have time to take a complete history about whether the patient has been addicted. The fear is very real and palpable that if they prescribe Schedule II opioids they will come under the scrutiny of the D.E.A., and they don’t need this aggravation.”

Proper pain management will always take time, but the D.E.A. can at least ensure that honest doctors need not fear prison. It should use the standard it claims to follow: for a criminal prosecution to occur, a doctor must have broken the link between the opioid and the medical condition. If the evidence is of recklessness alone, then it should be a case for a state medical board, the D.E.A.’s registration examiners or a civil malpractice jury.

Undoubtedly, such a limit will allow a small group of pill-mill doctors to escape prison. But America lives with freeing suspects whose possible crimes are discovered through warrantless searches or torture — and unlike other suspects, doctors who lose their licenses are as incapacitated as those behind bars. For cases without the broken connection, prosecution is too blunt an instrument. It runs too high a risk of condemning innocent physicians to prison and discourages the practice of a medical specialty desperately needed by millions of Americans.

Pain patients are the collateral victims here. It is worth remembering that the vast majority of McIver’s patients were not people who abused or sold their medicines. One of those who didn’t was a man named Ben, a tall, heavy man in his 50s who lives about 45 minutes from Greenwood. (He asked that his last name not be used because of the stigma still attached to taking opioid drugs.) Ben was once a mail carrier and a farmer and cattle rancher. But years of pushing 800-pound bales of hay wore out his back. In 2001 he had an operation to fuse the bottom three vertebrae. The few Vicodin his neurosurgeon prescribed did not control his pain. “I never had enough to get me through the night,” he said. “He wasn’t going to go any further than Vicodin — and he was doing me a favor by doing that, because his other partners wouldn’t have done as much as he did.” His neurosurgeon recommended he find a pain doctor. He started seeing McIver. The first examination, Ben said over coffee in a local Waffle House, was “extremely thorough — he had me crying. I hardly ever got out of there in less than two hours — he would be on top of me popping my back.”

And he got opioids. With his typical imprudence, McIver told Ben: “You don’t worry about it, take whatever you need to be pain-free, if it takes 2 pills or 10 pills. If you’re taking too much and slurring your words, you know to back off. Use some common sense.” At McIver’s request, Ben kept a diary of what he took and how much. He reached a top dosage of five 80-milligram pills of OxyContin four times a day — more opioids than Shealy was taking at the time of his death. “I never felt high,” he said. “They helped my pain. I could get out and work, use the bulldozer. I was working a 250-head cattle herd. I was doing everything relatively pain-free because of the drugs. They gave me my life back.”