RIVERHEAD, N.Y. (CBSNewYork/AP) — A physician assistant on Long Island is accused in a scheme to sell oxycodone pills that he prescribed.

Michael Troyan, 37, was arrested Wednesday morning in Riverhead.

READ MORE: Sneak Peek: Lincoln Center Plaza Transformed Into Green Space For Outdoor Summer Performances

Federal prosecutors allege Troyan prescribed the pain medication to his accomplices between November 2011 and October 2015, knowing the pills would be sold illegally.

Troyan, who operated two urgent care clinics on the East End, is accused of writing thousands of prescriptions and collecting half of the profits from the sale of the pills.

READ MORE: LIRR Service Restored After Massive Fire At Westbury Garbage Facility

Prosecutors allege Troyan was caught on video writing prescriptions for oxycodone and receiving large quantities of cash during an undercover operation at his Riverhead medical office.

If convicted, he faces up to 20 years in prison.

MORE NEWS: Police Open Fire After Pulling Over Suspected Car Thief On West Side Highway

(TM and © Copyright 2015 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2015 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report.)