A Florida law that only allows doctors to prescribe three days’ worth of opioid pills for acute pain appears to have led to decreased opioid use, Reuters reports.

Researchers at the University of Florida College of Pharmacy analyzed pharmacy prescription claims for opioids dispensed from January 2015 through March 2019 from a single health plan serving more than 45,000 employees of a large Florida employer. They found that after the law was passed in July 2018, doctors wrote fewer and shorter prescriptions for opioids.

Before the law was passed, 5.5 per 1,000 patients started a new prescription for opioids. That decreased to 4.6 per 1,000 after the law was implemented, the researchers report in JAMA Network Open. There was also an immediate decrease in use of hydrocodone.

“We expected to find a decrease in opioid use following the law, but we did not anticipate the significant decline in the number of users,” lead researcher Juan Hincapie-Castillo, Pharm.D., Ph.D., said in a news release.