Drug manufacturer Insys Therapeutics Inc. has agreed to pay $225 million in order to end federal investigations into allegations that it used illegal marketing schemes to push a powerful opioid-based painkiller.

Federal prosecutors allege that company used kickbacks and veiled bribes in order to sell a fentanyl spray, called Susbys, which is designed for cancer patients suffering from severe pain.

The company agreed to pay a $2 million criminal fine and forfeit $28 million. Additionally, Insys agreed to pay $195 million to settle civil allegations, according to the Associated Press.

U.S. Attorney Andrew Lelling said that for years the company profited while it contributed to the opioid epidemic in the U.S., which has claimed the lives of hundreds of thousands.

“For years, Insys engaged in prolonged, illegal conduct that prioritized its profits over the health of the thousands of patients who relied on it,” Lelling said.

Insys executives, including 76-year-old founder John Kapoor, were found guilty of racketeering conspiracy charges last month. The Boston trial revealed tactics that were used to bribe doctors into prescribing the drugs, including offering speaker fees for events marketed as educational workshops for doctors, which prosecutors say were really little more than fancy dinner events.

Other tactics included getting former strippers to give doctors lap dances and producing a rap video glamorizing higher doses of the drugs.

The charges against Kapoor and others carry a sentence of up to 20 years. The executives have denied all wrongdoing.