Despite the opioid epidemic, one in 12 U.S. physicians — and nearly one in five family doctors — in recent years accepted payments from pharmaceutical companies related to opioids.

That's according to a study out Wednesday from Boston Medical Center's Grayken Center for Addiction Medicine.

The study found that between August 2013 and December 2015, a total of $46 million in non-research opioid-related payments went to doctors.

The top 1 percent of doctors received more than 82 percent of the total, or $38 million. The average payment was $15.

"These are payments directly related to marketing medications and explaining to doctors how to prescribe these medications," study leader Dr. Scott Hadland, a BMC addiction specialist, told WBUR. "These tend to be the ones associated with increased prescribing."

He added: "We need to take a step back and think as a medical profession whether we should be allowing drug companies to be contributing to prescribing medications that we're actively working to reduce prescribing of."

The study also found that from 2014 to 2015, payments were increasing, and the number of doctors receiving payments was up 26 percent.

In 2016, Massachusetts Gov. Charlie Baker signed into law a measure to limit first-time opioid prescriptions. More than 2,000 people died from opioid-related overdoses in 2016, the state has said.