(Reuters) - An Alabama doctor was sentenced on Friday to 21 years in prison for running two clinics with a colleague that prosecutors called a massive “pill mill,” in a case tied to the U.S. probe of Insys Therapeutics Inc.

Xiulu Ruan, who with John Couch ran the Physicians Pain Specialists of Alabama clinics, was sentenced by U.S. District Judge Callie Granade in Mobile, Alabama, after a jury in March found them guilty of racketeering conspiracy and other felonies.

The 54-year-old’s sentencing came after Granade on Thursday imposed a 20-year prison term on Couch. Gordon Armstrong, a lawyer for Ruan, said he planned to appeal.

“We believe that a grave injustice has occurred and that Dr. Ruan should not have been convicted,” Armstrong said in a statement.

Prosecutors said that before federal authorities executed multiple search warrants in 2015, Ruan and Couch jointly owned and operated Physician’s Pain Specialists of Alabama, which had two clinics in Mobile, as well as C&R Pharmacy.

Through those clinics, Couch and Ruan, motivated by their own financial self-interest, regularly wrote prescriptions for large quantities of addictive medications including fentanyl without a legitimate medical purpose, the prosecutors said.

The case focused partly on two brand name instant-release fentanyl drugs, Subsys, manufactured by Insys, and Abstral, which was then manufactured by Galena Biopharma Inc.

According to prosecutors, while both drugs were approved by the U.S. Food and Drug Administration for cancer pain, Ruan and Couch prescribed Subsys and Abstral for off-label uses to treat neck, back and joint pain.

Prosecutors said the doctors received illegal kickbacks from Insys in exchange for prescribing Subsys and became among the top U.S. prescribers of the drug.

Ruan and Couch also bought $1.6 million of Galena shares and tried to manipulate its stock price by driving up sales of Abstral, prosecutors said.

“Any medical professional who chooses to place profit over patient care should heed the lengthy sentences received by Dr. Ruan and Dr. Couch,” Acting U.S. Attorney Steve Butler said in a statement.

In December, federal prosecutors in Boston brought charges against six former Insys executives and managers, including former Chief Executive Michael Babich, related to a scheme that involved bribing doctors to prescribe Subsys. They have pleaded not guilty.

Federal charges have also been filed in four states against at least five other ex-Insys employees. Insys on May 9 said it was working toward a U.S. Justice Department settlement.

The case is U.S. v. Couch, et al, U.S. District Court, Southern District of Alabama, No. 15-cr-88.