PROVIDENCE, R.I. — Gov. Gina Raimondo has signed into law a bill that would allow law enforcement access to an electronic database of prescription painkillers without a warrant.

The proposal signed Wednesday by the Democratic governor will give criminal investigators from state and local agencies access to a database used by health professionals to track prescribing patterns for various opioids, including Vicodin and OxyContin, stimulants and sedatives.

The attorney general’s office has said the bill would allow law enforcement to investigate “pill mills and drug diversion.”

Raimondo says the bill is aimed at combating the state’s opioid crisis.

More than 20 groups have denounced the legislation, saying it would allow law enforcement to invade people’s privacy and undermine work to combat opioid overdoses.