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.

“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 in 2014. 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 that his daughter and her boyfriend had died the night before.

“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 the 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.