A federal appeals court on Friday threw out the convictions of a doctor accused of overprescribing powerful pain medication and ordered a new trial for him.

The Denver-based 10th Circuit Court of Appeals decision in the case of Shakeel Kahn, who worked in both Arizona and Wyoming, hinged on the instructions given to jurors during his trial and came after the U.S. Supreme Court ruled in favor of him and another doctor convicted in Alabama in a case stemming from the nation's opioid addiction crisis.

LARGE STASH OF DRUGS, $400,000 IN STOLEN ARTWORK RECOVERED BY POLICE FROM COLORADO HOTEL ROOM

Colorado Fox News graphic

The federal court has thrown out the case of a Wyoming doctor accused of overprescribing oxycodone and fentanyl. 

CLICK HERE TO GET THE FOX NEWS APP

In June, the Supreme Court ruled that the government needed to prove beyond a reasonable doubt that doctors accused of overprescribing medication intended to act without authorization and sent Kahn's case back to the 10th Circuit, which previously had upheld his conviction. In its latest ruling, the appeals court found that jurors were repeatedly told they could convict Kahn if they found that he did not conform with usual medical practices or act without a legitimate medical purpose, which fell short of the legal standard set by the Supreme Court.

Kahn was sentenced to 25 years after being convicted of conspiracy to unlawfully distribute and dispense controlled substances resulting in death, including oxycodone, an opioid pain reliever, and fentanyl, a synthetic opioid, in 2019. According to prosecutors, he prescribed nearly 2.2 million pills, nearly half of which were oxycodone, between 2011 and 2016, routinely after only perfunctory examinations or no examinations at all.

Kahn worked in Fort Mohave, Arizona before opening a second practice in Casper, Wyoming in 2015.