Some emergency room doctors are far more likely than others even within their own department to prescribe opioids to treat pain in older people, and their patients are at greater risk of using the powerful drugs chronically than those who saw doctors who prescribe them less frequently, according to a large new study.

The research was published Wednesday in The New England Journal of Medicine.

As the opioid epidemic continues to devastate communities around the country, the study was the latest attempt to identify a starting point on the path to excessive use.

“This is the analysis we have been looking for to show the risk of a single exposure of a patient in an emergency room to an opioid,” said Dr. Lewis S. Nelson, the chairman of emergency medicine at Rutgers New Jersey Medical School and University Hospital, who was not involved in the study.

The study tracked about 375,000 Medicare patients with a similar range of complaints in several thousand hospital emergency rooms from 2008 to 2011, as well as the frequency of opioid prescriptions written by the doctors who treated them. It found that the prescribing patterns of whichever physician they encountered were an important factor in their future opioid use.