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.

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

Lelling said his department has made no determination that the medical professionals receiving the letters had violated the law. He did not say how many letters were sent.

The goal is to reduce overdose deaths by notifying doctors when their patients have died either as a result of — or close in time to — receiving an opioid prescription, Lelling said.

The letters are meant to remind physicians that 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," Lelling said. The department also hopes to reduce the risk of unused prescriptions being diverted for non-medical use.

"One source of opioids — used for both legitimate and illegitimate purposes— is medical professionals, who have an obligation always to act in patients' best interests," Lelling said in the statement.

A report released earlier this month by the Massachusetts Department of Public Health found there were 1,518 opioid-related overdose deaths through September of this year, a number that includes deaths confirmed to have been caused by overdose and others expected to be added to the list once an official determination is released.

In 2017, the state reported 1,538 confirmed and estimated overdose deaths.

Dr. Alain Chaoui, president of the Massachusetts Medical Society — a statewide professional association for physicians and medical students — said the group stands behind physicians providing "evidence-based care to the sickest, most vulnerable patients."

"We remain dedicated to promoting best opioid prescribing practices, and we urge all concerned parties to join us in expanding addiction treatment and fentanyl-driven overdose prevention," Chaoui said in statement.

He also pointed to a reduction in first-time opioid prescriptions in Massachusetts over the past three years.

Legislation signed by Republican Gov. Charlier Baker in 2016 took aim at excessive or unnecessary painkiller use that can lead to opioid dependency by limiting first-time opioid prescriptions to a 7-day supply and allowing patients to request that pharmacies fill less than the full prescription of an opioid.