A new bill proposed by Massachusetts Governor Charlie Baker would allow doctors to hold patients involuntarily for treatment and limit their supply of opioid painkillers, according to The Wall Street Journal.

The Governor introduced the new legislation to help combat his state’s increasing prescription painkiller abuse problem. The bill would allow hospitals to hold substance abusers who pose a danger to themselves, or others, for treatment for 72 hours. It would parallel an existing law which permits doctors to take similar steps when a person suffers from mental illness and patients would be given the right to legally challenge the determination.

The legislation would also limit patients to a 72-hour supply of opioid painkillers for first-time prescriptions or when visiting a new doctor, with exceptions for the treatment of emergency medical conditions and people in hospice care.

States and legislatures around the U.S. are grappling with the epidemic of painkiller and heroin abuse, which was responsible for 24,000 overdose deaths in 2013. In Massachusetts, opioid-overdose deaths have risen sharply, with 1,256 in 2014, according to state reports.

“I’ve never seen anything with the kind of negative momentum that this particular issue has,” said Baker at a news conference last week. “When you think about the fact that we’ve tripled the number of people in the past four years who’ve died of an opioid overdose – in the short term, the goal here has to be to disrupt the trend,” he concluded.