BOSTON (AP) _ The top federal prosecutor in Massachusetts has sent letters to a number of doctors and medical professionals in the state warning them that their prescribing practices have raised red flags in the state's effort to combat opioid addiction.

U.S. Attorney Andrew Lelling in a statement Thursday said the letters went to physicians and others identified as having prescribed opioids to a patient within 60 days of that patient's death _ or to a patient who subsequently died from an opioid overdose.

The letters are meant to remind physicians that although prescriptions may be medically appropriate, the law prohibits prescribing opioids ``without a legitimate medical purpose, substantially in excess of the needs of the patient, or outside the usual course of professional practice.''

About 2,000 Massachusetts residents died of opioid-related overdoses in 2017.