The pharmaceutical industry has spent more than $880 million over the past decade to fight laws that would limit the availability of powerful opiods such as OxyContin, Vicodin and fentanyl in the United States, according to an investigation by the Associated Press and the Center for Public Integrity published Sunday.

Often, these lobbying expenditures are funneled through groups like the American Cancer Society Cancer Action Network and other advocacy groups that represent the interests of patients with terminal cancer or chronic pain, whose conditions can be alleviated by taking opioids.

While opioids are critical for cancer patients and those in terminal pain, opioid abuse, including heroin and prescription drugs has been called the worst drug epidemic in American history. The numbers of overdose deaths have been rising in tandem with the booming sales of the drugs. On an average day in the United States, roughly 129 people die from an opioid-related overdoses, according to White House.

Big pharma spending on political contributions and lobbying has been targeted on limits being placed on prescribing opioids by doctors. To put the numbers into context, AP and the Center of Public Integrity found the pharmaceutical industry had spent eight times more than the gun lobby during that same period, from 2006 to 2015.

Lawmakers interviewed for the story attributed the failure of bills that they had pushed to stem the flow of opioids, to the aggressive lobbyists working on behalf of those pharmaceutical companies.