Yet for the right patients, methadone can be a godsend. Alexandra Sherman, a patient of Dr. Heit’s at his Fairfax, Va., clinic, suffered for years from hip and shoulder pain that “felt like somebody stabbing me with a knife,” she said. Pain began to rule and ruin her days.

Dr. Heit gave her OxyContin and later, because it seemed to work better and because of the expense, switched her to methadone. Her insurance at one point covered only $500 in prescriptions, which paid for just one month’s worth of OxyContin, compared with methadone’s cost of $35 a month.

Methadone “has given me my life back,” Ms. Sherman said.

But Dr. Heit did not just throw drugs at her problem. He told her that she would also have to try physical therapy as well. They signed a contract listing mutual obligations  she would follow directions, he would be on call. He starts patients at low doses, makes them bring in their pill bottles so he can count how many are left, and may give urine tests to deter mixing drugs.

Some doctors, like Dr. Theodore Parran of Case Western Reserve University, also require methadone patients to give them the names of relatives or friends they can call from time to time.

But not all doctors have taken such precautions. Tony Davis, a contractor in Victorville, Calif., had just turned 38 in 2004 when, after years of migraines and back pain, he saw a new pain doctor in his Kaiser Foundation Health Plan. The doctor, who had already given him the sedative Xanax, prescribed methadone because of his continued pain.

The second day on the two medications, Mr. Davis said, “I’m feeling really weird,’ ” recalled his wife, Pebbles Davis. The two lay down for a nap and when she woke up, her husband was dead.

Ms. Davis recalled that the coroner had told her, “Given the medicines he was on, his brain forgot to tell his heart to beat and his lungs to pump.” The case went to an arbitrator, who ruled that although Mr. Davis had overused his drugs in the past, the doctor had failed to warn him about the new risks of starting methadone together with Xanax and that the care was substandard. Ms. Davis was awarded more than $500,000. “I never had any idea of the risk nor did my husband,” she said.