A five-month investigation into the distribution of oxycodone pills in Waldo County has led to the arrest of three people, including a Massachusetts man charged with bringing the drug into Maine.

Agents with the Maine Drug Enforcement Agency arrested Arthur Gardiner, 63, and Shelby Tapley, 18, both of Swanville, and Gary Stevens, 30, of Lynn, Mass., according to a news release.

Gardiner was out on bail for an earlier charge of aggravated trafficking in oxycodone, and during a bail check March 28 police arrested Gardiner and Tapley on charges of drug possession for allegedly having pills that were not prescribed to them. Officers seized 129 hydrocodone, 17 oxycodone pills and 91 anti-anxiety pills, according to the MDEA.

Police investigating the source of the drugs conducted an undercover sting that led to Stevens’ arrest on Wednesday.

Agents met Stevens in a Topsham parking lot and arrested him, seizing 320 oxycodone pills worth about $15,000 on the street. Police charged Stevens with aggravated trafficking in oxycodone.

Agents were joined by officers from the Belfast Police Department, Waldo County Sheriff’s Office, Sagadahoc County Sheriff’s Office and Maine State Police.