Insys Therapeutics has agreed to pay $225 million to settle criminal and civil probes of its unlawful marketing of an opioid painkiller, the Justice Department said Wednesday.

Last month the founder of the Arizona-based company and four other former executives were convicted of setting up a system of large scale bribes for doctors to prescribe Subsys, a powerful and addictive for terminal cancer patients.

The settlement will be paid out over five years and settle all government probes into how the company tried to sell this fentanyl spray, which is 50 to 100 times stronger than morphine.

"For years, Insys engaged in prolonged, illegal conduct that prioritized its profits over the health of the thousands of patients who relied on it," US Attorney for the District of Massachusetts Andrew Lelling said.

"Today, the company is being held responsible for that and for its role in fueling the opioid epidemic," he said.

The company agreed to plead guilty to five counts of mail fraud to settle the criminal side of the case and pay $31 million in restitution and fines, the department said.

Insys will pay another $195 million to settle five criminal complaints alleging it made false claims.

In the trial that ended last month, Insys founder John Kapoor became the first head of a major US pharmaceutical to be convicted of bribing doctors to prescribe addictive painkillers. These are blamed for fueling an opioid crisis that has claimed tens of thousands of lives.

Almost 400,000 people have died from overdoses involving prescription or illicit opioids over the past two decades, according to the Centers for Disease Control and Prevention. Nearly 48,000 people died in 2017 alone from opiate overdose.

Between 2012 and 2015, Insys executives paid to prescribe large quantities of the highly addictive drug, which was approved to alleviate in terminal cancer patients.

Doctors were encouraged to recommend the spray to who did not need it and also in excessive doses, prosecutors argued at the trial.

Officially, the bribes were paid as fees to doctors speaking at seminars for health professionals to praise the benefits of the drug.

The 's aggressive marketing tactics reportedly also included sales representatives making a rap video to promote the drug.