Massachusetts state senators plan to vote Tuesday on a bill that would clear the way for cities and towns to open overdose prevention centers, where people can use illegal drugs under the supervision of trained staff.

The new bill from Senate Democrats would allow communities across the state to host overdose prevention centers and other harm-reduction programs — like drug-testing services and overdose reversal care — with liability protections for the people who run those programs and those who participate in them.

It would also task the Department of Public Health with studying the state’s sober homes, create a licensure program for alcohol and drug counselors and recovery coaches, and increase access to opioid-reversal drugs like Narcan through a series of measures.

“I think the Senate believes we need to approach the addiction crisis in Massachusetts with the urgency it demands,” Sen. Julian Cyr, the Senate chair of the Mental Health, Substance Use and Recovery Committee, told GBH News. “And that means deploying every evidence-based tool available to save lives, which we believe includes overdose prevention centers.”

Also known as supervised consumption sites or safe injection sites, overdose prevention centers are not a new idea on Beacon Hill, where policymakers for years have been looking to stem the tide of overdose deaths. The state Department of Public Health tracked 2,125 opioid overdose deaths last year, representing a 10% drop from 2022, when a record 2,357 people died of opioid overdoses.

Some communities, including Somerville, have already taken steps toward opening overdose prevention sites. Cyr, a Truro Democrat, named Worcester, Cambridge and Northampton as other cities that have “expressed strong interest” in opening such a site.

Advocates for years have called for state lawmakers to authorize the facilities, which are technically illegal under federal law, as a way to help people who are using drugs stay alive and potentially connect with treatment and other resources.

Former Gov. Charlie Baker opposed supervised consumption sites, but under Gov. Maura Healey, the state Department of Public Health last year released a feasibility report that labeled overdose prevention centers as an effective intervention to decrease rates of fatal overdoses. The report said the sites could be feasible in Massachusetts, depending on legislative action that extends state-level legal protections.

Cyr said the liability protections in the Senate’s bill address the concern that he believes is “probably the single biggest barrier that has halted a place like Somerville, for instance, from launching an overdose prevention center.”

No city or town would be required to host an overdose prevention site under the bill. Communities that do wish to open one would first need approval from their local board of health and select board or city council.

“That local buy-in, I think, is really crucial,” Cyr said.

Though the Senate’s vote will mark a milestone in the bid to establish overdose prevention centers in Massachusetts, it will not automatically bring about a new law.

The House stayed silent on overdose prevention centers in the bill it passed last month to address opioid deaths. Rep. Adrian Madaro, the House chair of the Mental Health, Substance Use and Recovery Committee, told State House News Service at the time that there was still “more work to be done” on the topic, including building support among state lawmakers and overcoming federal legal barriers.

The House bill does include some measures limiting liability for workers and drug users at harm-reduction sites. Both bills would require health insurers to cover opioid-reversal drugs without cost-sharing or prior authorization.

The two branches have little time to agree on a final version of the legislation, with formal lawmaking sessions ending for the year after Wednesday.

Senators on Tuesday also plan to vote on a bill aimed at improving pregnancy and postpartum health care in Massachusetts and another that would reshape the standards for defining parentage under state law to reflect more types of families. The House has already approved similar bills on both those topics.