PITTSBURGH — A Pennsylvania doctor who authorities say traded opioid prescriptions for sex and sexually explicit photos and texts has been convicted.

A federal jury late Thursday found Dr. Milad Shaker guilty of illegally dispensing opioids to a patient over a nearly three-year period.

The U.S. Attorney's Office announced the conviction Friday.

Authorities say Shaker, of Greensburg, would meet the patient at hotels in Pennsylvania and engage in sex in exchange for hydrocodone and other opioid medications.

Shaker testified during the six-day trial that "opioids are like candy" and that 10 or 20 "will not hurt you."

The 50-year-old Shaker has been released until his sentencing, which is scheduled for Feb. 20. He must stop practicing medicine.

Pennsylvania has been among the states hardest hit by a national opioid crisis.