Minnesota's attorney general and the state's Board of Pharmacy sued a pharmaceutical company Wednesday, alleging it illegally marketed a fentanyl painkiller and violated state restrictions on giving doctors gifts.

The lawsuit says the painkiller was approved by the U.S. Food and Drug administration to treat pain in cancer patients but that Arizona-based Insys Therapeutics marketed it for other conditions and at higher doses.

It's the state's first lawsuit targeting a pharmaceutical company related to the manufacture or distribution of opioids.

In Minnesota, Insys sold $4.7 million of the painkiller under the brand name Subsys between July 2013 and February 2017. It's an under-the-tongue spray that was approved by the FDA for "management of breakthrough pain in cancer patients" who are already tolerant to opioids.

But Minnesota Attorney General Lori Swanson said Insys "encouraged physicians to prescribe this highly-potent fentanyl product to patients who didn't have cancer, even though it was only approved for severe breakthrough pain in cancer patients."

The company, she added, also paid non-oncologists money to get doctors prescribing the drug. Swanson said the payments were described as speaker fees "to skirt a Minnesota law that prohibits pharmaceutical companies from gifts to doctors of over $50.

"The company was unable to provide evidence that some of the supposed 'speeches' had any audience other than the sales agent or physician's office staff," Swanson said.

Swanson told reporters Insys was "really engaging in some very terrible conduct to make money for themselves without caring for their patients ... it's as brazen a conduct as you can imagine from a pharmaceutical company."

Seventeen doctors in Minnesota prescribed the drug, but just two accepted speaker fees from the company totaling $43,000. The two doctors who accepted money have been referred to the Minnesota Board of Medical Practice, Swanson said, adding that other investigations are ongoing.

The director of the Minnesota Board of Medical Practice said any information about pending discipline is not public.

The Minnesota Board of Pharmacy is concerned that such a powerful opioid was marketed for non-approved uses and at potentially excessive doses, said Cody Wiberg, the board's executive director.

"The Board of Pharmacy as a state agency exists to protect the public," Wiberg said. "The actions of Insys, in this matter, jeopardize the public's safety, health and welfare."

The company has already settled with a handful of states over similar marketing practices. And just last year, the company's founder and a number of former executives were indicted in Massachusetts on charges that they'd bribed doctors and defrauded health care providers.

Insys said in a statement that the company's new management takes allegations of past wrongdoing seriously and that they've focused on instilling "fundamentally sound values" in employees: "We are determined to take responsibility for the past and to learn from it."

Opioids are the family of drugs that include everything from prescription painkillers like OxyContin to street drugs like heroin. About 40,000 Americans now die each year after overdosing on opioids.

A number of other states have recently filed suit against OxyContin manufacturer Purdue Pharma for their marketing of the drugs.

Last year, Swanson joined dozens of attorneys general in a national investigation of companies that manufacture and distribute opioid painkillers, although Minnesota has yet to file a lawsuit in that investigations.

"Stay tuned, is what I would say," Swanson said. "We're very, very much involved, and very concerned about the conduct of the pharmaceutical industry as it relates to contributing to the opioid epidemic."

Other lawsuits have already been filed by local government bodies in the state.

Seventeen Minnesota counties have filed suit against pharmaceutical companies that manufacture opioids. Minneapolis and St. Paul have also explored joining lawsuits against pharmaceutical companies.

At least 401 Minnesotans died of opioid overdoses last year, according to preliminary numbers from the state.

Although prescription opioids are still blamed for the highest number of overdose deaths, the state saw a huge surge in deaths last year caused by fentanyl.

Many public health experts have linked the availability of prescription painkillers to the abuse of other opioids.