Doctors who had just one extra meal paid for by an opioid company were more likely to prescribe opioids than doctors who got fewer free meals, according to a new research letter published in JAMA Internal Medicine.

The study, from researchers Scott Hadland, Magdalena Cerdá, Yu Li, Maxwell Krieger, and Brandon Marshall, helps show how shady marketing practices by opioid companies contributed to America’s opioid epidemic, which now kills tens of thousands of people in the US each year.

The study looked at the Open Payments database, which was used to pull out non-research payments to doctors in 2014. It then compared that data to claims in the Medicare Part D Opioid Prescriber Summary File from doctors who wrote opioid prescriptions in 2015, leaving in “all physicians with complete, nonduplicate information who had at least 10 opioid claims during 2015.”

The results are striking. Here’s a chart looking at the number of meals that doctors received through opioid companies in 2014 and the number of opioid prescriptions that doctors wrote in the following year:

Each meal paid for by drug companies seems to have made a difference, resulting in more opioid claims. (Drug companies usually set up these meals by contacting doctors or their staff directly — by phone, in-person visits, meeting with physicians at conferences, and so on.)

The chart only captures part of the story. Opioid companies also plied doctors with speaking fees, free travel, consulting fees, and “education” programs. In general, more non-research payments correlated with more opioid prescriptions in the following year.

One company, Insys Therapeutics, accounted for half of these payments, according to the study. Insys has since 2014 come under fire, including by a Senate investigation, for its extremely aggressive marketing for its fentanyl product, Subsys. Founder John Kapoor and other executives have been arrested due to the company’s shady practices. Insys claims it has since changed its ways.

One caveat to the study: Not every doctor who prescribed opioids received a free meal or other payment from opioid companies. Only 7 percent of doctors who prescribed opioids under Medicare Part D got “nonresearch payments related to opioid products in 2014,” the researchers found. So other factors, including, for some patients, genuine need, did drive more prescriptions.

The researchers also noted they only found correlation, not causation: “Limitations include the possibility of reverse causality because physicians who receive industry payments may be predisposed to prescribe opioids. Our findings establish an association, not cause and effect.”

Still, the findings are certainly suggestive. Over the past several years, we have seen more and more reports of opioid companies aggressively marketing their products to doctors — and that seems to have resulted in more opioid prescriptions and overdose deaths.

Opioid companies aggressively marketed their products

Evan Hughes at the New York Times Magazine has a great review of Insys’s previous marketing strategy, which included paying for speaking events that often “consisted of a nice dinner with the sales rep and perhaps the doctor’s support staff and friends, but no other licensed prescriber in attendance to learn about the drug.” The company apparently couldn’t even be bothered to pay for a fake audience for its speakers.

A Los Angeles Times investigation by Harriet Ryan, Lisa Girion, and Scott Glover looked at the aggressive marketing tactics of Purdue Pharma, the maker of OxyContin. They found that Purdue misled doctors about OxyContin’s effectiveness by claiming that it could last for 12 hours.

“Even before OxyContin went on the market, clinical trials showed many patients weren’t getting 12 hours of relief,” Ryan, Girion, and Glover reported. “Since the drug’s debut in 1996, the company has been confronted with additional evidence, including complaints from doctors, reports from its own sales reps and independent research.”

The claim of 12-hour relief was critical to Purdue’s competitive advantage. If OxyContin really didn’t provide 12-hour relief, then it wasn’t more effective than other similar painkillers on the market.

In the face of the evidence, though, Purdue stood by its claim for years. And it told doctors that if patients weren’t seeing the promised results, then the problem was that doses were too low. That’s an alarming outcome for public health: As the Centers for Disease Control and Prevention warned, higher doses increase the risk of overdose and addiction.

Nonetheless, the company celebrated its profits. One sales memo uncovered by the Los Angeles Times was literally titled “$$$$$$$$$$$$$ It’s Bonus Time in the Neighborhood!”

Other companies, such as Teva Pharmaceuticals and Janssen Pharmaceuticals, also took part in aggressive marketing schemes for opioids, as the JAMA Internal Medicine study demonstrated.

The results: Opioid painkillers proliferated across the US. The drugs ended up in the hands of not just patients, but also teenagers who rummaged through parents’ medicine cabinets, friends and family who were gifted the drugs by patients, and a black market where people could sell the drugs for a huge markup. For much of the opioid epidemic, painkillers were the leading cause of drug overdose deaths, and most people who were addicted to opioids got started on painkillers.

That has changed in recent years as illicit opioids, particularly heroin and fentanyl, have become bigger causes of overdose deaths and a more common starting point for opioid addiction. But painkillers were the initial cause of the current opioid crisis, fostering more misuse of and addiction to the drugs.

In the face of all of this, there have been hundreds of lawsuits filed by governments and others against opioid companies. A judge in Cleveland is consolidating these cases in an attempt to reach a massive settlement agreement. The hope is that an agreement would not only restrict marketing from opioid companies but also lead to a financial settlement that would pay for addiction treatment across the US — both of which could help finally begin to reverse the opioid crisis.

For more on the causes of the opioid epidemic, read Vox’s explainer.