A Queens doctor accused of overprescribing painkillers to two patients who later suffered fatal overdoses was convicted on Friday of two counts of second-degree manslaughter and dozens of lesser charges.

The guilty verdict against Dr. Stan Xuhui Li came after a four-month trial in State Supreme Court in Manhattan and nearly six days of jury deliberations. Prosecutors had portrayed Dr. Li as reckless in his prescribing of drugs to patients who showed clear signs of addiction. Dr. Li’s lawyer had argued that his client had acted in good faith and that the patients who died overdosed because they failed to follow Dr. Li’s instructions.

The jury found Dr. Li, 60, guilty of 200 of the 211 charges against him. In addition to the manslaughter counts, those charges included reckless endangerment, criminal sale of a prescription for a controlled substance and falsifying records. State Supreme Court Justice Michael R. Sonberg ordered Dr. Li held without bail until he is sentenced on Oct. 20. He faces a prison term of five to 15 years on each of the manslaughter counts.

Dr. Li, an anesthesiologist from Hamilton, N.J., ran a pain management clinic one day each weekend in Flushing, Queens, where he saw dozens of patients a day, posted a price list on the wall for drugs that included oxycodone and Xanax and accepted payment primarily in cash.