WOODBURY - A Queens doctor accused of selling pain pill prescriptions to Long Islanders pleaded not guilty in court today.

Gracia Mayard, 61, was arraigned on a grand jury indictment.

Prosecutors say he sold nearly 3,000 oxycodone prescriptions between January 2012 and March of this year.

Mayard forfeited his license to prescribe narcotics in February after the DEA began investigating the allegations. They say he continued writing prescriptions without it.

If convicted, Mayard could get 20 years in prison.