PROVIDENCE, R.I. (AP) — Rhode Island’s governor has signed into law a bill authorizing the opening of so-called harm reduction centers where people dealing with addiction can take heroin and other illegal drugs under the supervision of medical professionals.

The Wednesday signing by Democratic Gov. Daniel McKee makes Rhode Island the first to enact such a statewide measure to combat the nationwide opioid epidemic.

Canada and other countries have long operated harm reduction centers, but none exist in the U.S. as they remain illegal under federal law.

Rhode Island’s law creates a two-year pilot program. The centers would also require local approval.