A Merrick doctor pleaded not guilty Tuesday to illegally distributing the narcotic painkiller oxycodone to patients, two of whom prosecutors said fatally overdosed on the drugs.

Michael Belfiore, 53, is accused of writing about 5,000 prescriptions for 600,000 of the pills over a three-year period that ended in January 2013, court records show. The names of the two patients who died have not been publicly released by federal prosecutors.

Belfiore appeared in Suffolk federal district court in Central Islip for his arraignment on a superseding indictment, which added new counts to the ones he had already faced when prosecutors initially charged him in October 2014.

In total, he is charged with 29 counts of illegally distributing oxycodone, records show.

Outside court, Belfiore emphasized to reporters he is still a practicing doctor.

“I tell my patients I’m still here for you. I haven’t gone anywhere, I haven’t done anything, and I’m doing my best for my patients,” Belfiore said.

advertisement | advertise on newsday

He added: “I would never give anything recklessly. I would never give anything that would intentionally endanger anybody.”

His attorney, Thomas Liotti of Garden City, said after the arraignment that his client testified before a grand jury in the case.

“We are not overly confident, and we know we have our work cut out for us because of a justified media frenzy involving the opioid crisis,” Liotti said. “The government’s concerns are totally legitimate, but the job of the defense is to make sure that good doctors and innocents are not unfairly prosecuted or convicted.”

One of the conditions of Belfiore’s release is that he can’t prescribe opioids like oxycodone, Liotti said. The doctor has been free on $500,000 bond since his arrest.

Belfiore was originally charged with prescribing oxycodone six times to an undercover Nassau County detective “with no legitimate medical need,” court records show. The prescriptions were written between March 15 and Aug. 12, 2013, records show.

The undercover detective approached Belfiore after allegations came from “several pharmacists, law enforcement officers and multiple confidential sources” that the osteopathic physician was “illegally issuing prescriptions to individuals who were abusing and/or diverting oxycodone pills,” records show.

The superseding indictment made public Tuesday said that patients also received oxycodone from Belfiore, with some getting as many as 180 pills with a dosage of 30 mg.

Belfiore was the eighth doctor arrested by federal agents in connection with illegally prescribing oxycodone on Long Island since the 2011 murders of four people by David Laffer as he robbed a Medford pharmacy. The crimes intensified an ongoing crackdown for the illegal distribution of painkillers.