BUFFALO, N.Y. — After three defendants fatally overdosed in a single week last year, it became clear that Buffalo's ordinary drug treatment court was no match for the heroin and painkiller crisis.

Now the city is experimenting with the nation's first opioid crisis intervention court, which can get users into treatment within hours of their arrest instead of days, requires them to check in with a judge every day for a month instead of once a week, and puts them on strict curfews. Administering justice takes a back seat to the overarching goal of simply keeping defendants alive.

"The idea behind it," said court project director Jeffrey Smith, "is only about how many people are still breathing each day when we're finished."

Funded with a three-year $300,000 U.S. Justice Department grant, the program began May 1 with the intent of treating 200 people in a year and providing a model that other heroin-wracked cities can replicate.

Two months in, organizers are optimistic. As of late last week, none of the 80 people who agreed to the program had overdosed, though about 10 warrants had been issued for missed appearances.

Buffalo-area health officials blamed 300 deaths on opioid overdoses in 2016, up from 127 two years earlier. That includes a young couple who did not make it to their second drug court appearance last spring. The woman's father arrived instead to tell the judge his daughter and her boyfriend had died the night before.

City Court Judge Craig Hannah presides over Opiate Crisis Intervention Court in Buffalo, New York on June 20, 2017. AP file

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"We have an epidemic on our hands. ... We've got to start thinking outside the box here," said Erie County District Attorney John Flynn. "And if that means coddling an individual who has a minor offense, who is not a career criminal, who's got a serious drug problem, then I'm guilty of coddling."

Regular drug treatment courts that emerged in response to crack cocaine in the 1980s take people in after they've been arraigned and in some cases released. The toll of opioids and profile of their users, some of them hooked by legitimate prescriptions, called for more drastic measures.

Acceptance into opioid crisis court means detox, inpatient or outpatient care, 8 p.m. curfews, and at least 30 consecutive days of in-person meetings with the judge. A typical drug treatment court might require such appearances once a week or even once a month.

"This 30-day thing is like being beat up and being asked to get in the ring again, and you're required to," 36-year-old Ron Woods said after one of his daily face-to-face meetings with City Court Judge Craig Hannah, who presides over the program.

Woods said his heroin use started with an addiction to painkillers prescribed after cancer treatments that began when he was 21. He was arrested on drug charges in mid-May and agreed to intervention with the dual hope of kicking the opioids that have killed two dozen friends and seeing the felony charges against him reduced or dismissed.

In addition to the Monday-through-Friday court dates, Woods attends daily outpatient counseling, submits to drug testing, works at his family paving business and, although they are not required, attends Narcotics Anonymous meetings.

"This court makes it amazingly easy. Normally I'd be like ... 'This is stupid,'" said Woods, who has been through programs before. "But for the first time I have an optimistic outlook and I wanted to get clean."

Buffalo's get-tough court is part of a nationwide push to come up with ways to use the criminal justice system to address the opioid crisis. In April, the National Governors Association announced that eight states — Alaska, Indiana, Kansas, Minnesota, North Carolina, New Jersey, Virginia and Washington — will together study, among other things, how to expand treatment within the criminal justice system.

The grant pays for the coordinator and case managers from UB Family Medicine, a University at Buffalo medical practice, who enforce curfews, do wellness checks and transport patients. Insurance is billed for treatment.

Related: Opioid Prescriptions Are Down But Not Enough, CDC Finds

Judge Hannah hasn't taken a day off since the program started, determined to show participants he is as committed as they are. Although he still carries a full City Court load, he meets unhurriedly and one by one with the people in the opioid program during prolonged sessions on the bench.

These are not interrogations about whether they've used drugs the previous night; they are chats about the weather, the weekend and work. Some have missed check-ins or otherwise slipped and are brought before him in handcuffs after being picked up by law enforcement.

"I don't want to die in the streets, especially with the fentanyl out there," Sammy Delgado, one of the handcuffed defendants, said. After his arrest for drug possession, Delgado left inpatient treatment after six days but wants another chance.

Hannah, as much counselor and cheerleader as judge, told him: "You have a lot of people pulling for you. We need you to pull for yourself."

Later, in his office, Hannah described his philosophy as tempering justice with mercy. He said he's willing to overlook defendants' occasional lies and attempts to fool him, "because we've got them now. We're just trying to save their life at this point and to stabilize them, get them back on track."