PHILADELPHIA – Steven Kelty had been addicted to crack cocaine for 32 years when he tried a different kind of treatment last year, one so basic that he was skeptical.

He would come to a clinic twice a week to provide a urine sample, and if it was free of drugs, he would get to draw a slip of paper out of a fishbowl. Half contained encouraging messages but the other half were vouchers for prizes worth between $1 and $100.

"I've been to a lot of rehabs, and there were no incentives except for the idea of being clean," said Kelty, 61, of Winfield, Penn. "Some of us need something to motivate us — even if it's a small thing — to live a better life."

The treatment is called contingency management, because the rewards are contingent on staying abstinent. A number of clinical trials have found it highly effective in getting people addicted to stimulants like cocaine and methamphetamine to stay in treatment and stop using. But outside the research arena and the Department of Veterans Affairs, where Kelty is a patient, it is nearly impossible to find programs that offer such treatment — even as overdose deaths have soared. Researchers say one of the biggest obstacles is a moral objection to the idea of rewarding someone for staying off drugs. That is one reason publicly funded programs like Medicaid do not cover the treatment.

Some treatment providers are also wary of giving prizes that they say patients could sell or trade for drugs. Greg Delaney, a pastor and the outreach coordinator at Woodhaven, a residential treatment center in Ohio, said, "Until you're at the point where you can say, 'I can make a good decision with this $50,' it's counterproductive."

Two medications used to treat opioid addiction, methadone and buprenorphine, have been viewed with similar suspicion because they are opioids themselves, even though research shows they substantially reduce the risk of death and help people stay in treatment. But the federal government has started aggressively promoting such treatment for opioid addiction, and has heavily invested in expanding access to it.

The fact that no public or private insurer will pay for contingency management, except in a few pilot programs, is a major challenge to expanding it; the biggest obstacle is that offering motivational rewards to patients has been interpreted as violating the federal anti-kickback statute. A group of experts asked the Department of Health and Human Services to waive the statute for two years as it pertains to contingency management, but the agency refused.

Congress recently told states that they could start spending federal "opioid response" grants on treatment for stimulant addiction, but the agency that distributes the grants allows only $75 per patient, per year, for contingency management.

"The biggest question is, How do we get the payers on board with this?," said Eric Gastfriend, the chief executive of DynamiCare Health, a technology company in Boston. The company has worked with BrightView and other treatment programs to provide contingency management through a phone app that patients can use to share saliva test results with providers in real time, via video. Patients can earn up to $600 over the course of a year through DynamiCare, on a debit card that blocks cash withdrawals and purchases at liquor stores and bars.

"I was hesitant to try it — like, hey, is this legal?" said Dr. Shawn Ryan, the chief medical officer and president of BrightView Health, an addiction treatment provider. But the results have been striking, he said."I'm talking about significant improvements in attendance to therapy sessions, significant reductions in drug and alcohol use."

Federal officials say that they want to expand access to contingency management for stimulant addiction, but that finding an effective medication for it would be better.

"If we were paying for it, that would help," Dr. Nora Volkow, the director of the National Institute on Drug Abuse, said of contingency management. "But we badly need medications to help strengthen the response to behavioral interventions."

Jodi Waxler-Malloy, 47, of Toledo, Ohio, tried contingency management after participating in more than a dozen treatment programs since her early 20s. BrightView restarted her on buprenorphine for her heroin addiction and set her up with the DynamiCare app and debit card as an incentive to stay off meth. DynamiCare would add between $1 and $25 whenever she went to a doctor appointment or therapy, though she never knew the amount ahead of time.

Waxler-Malloy said the monetary rewards helped her get through the first month of sobriety in particular, when her cravings were intense and she needed to save whatever money she earned waitressing for rent at a sober living house she was waiting to move into.

"Maybe I was going to the appointments and meetings for the wrong reason at that time, but it helped me in the long run — helped me meet people, have a support group," she said.

Contingency management has been used the most by the Department of Veterans Affairs, where 110 clinics and hospitals have employed it since 2011 to try to help more than 5,100 veterans stay off drugs.

One problem with contingency management, evidence suggests, is that people have less success staying abstinent after the treatment ends. For that reason, Richard Rawson, a researcher at the University of Vermont, believes it should be used indefinitely, just as medications for opioid addiction often are. "Unfortunately, addiction is a chronic brain disease and treatments need to be designed to accommodate this reality," he said.