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: Tony Awards, TV Special Hope To Be The Jab Broadway Needs

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: Public Memorial For Gabby Petito Held On Long Island

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: New Video Shows Suspects Wanted For East Harlem Slashing

(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.)