AUBURN — A Monmouth man pleaded guilty Thursday to robbing two pharmacies last year.

Dakota Madore, 19, admitted to threatening a Hannaford clerk in China in April and to committing a similar robbery at a CVS in Lewiston a month later.

Police said in both heists, Madore and another man committed the robberies in an attempt to obtain the painkiller oxycodone.

In the Lewiston robbery, investigators said one of the men entered the CVS store on Sabattus Street on May 4 shortly before 9 p.m., wearing sunglasses, a skeleton mask and a hood over his head. He showed a note to the pharmacist, demanding oxycodone and saying he didn’t want to shoot anybody. No weapon was displayed, police said.

The pharmacist turned over an undisclosed amount of the drug before the suspect fled on foot, police said. They did not specify whether they believe it was Madore or Severance who went into CVS to commit the robbery.

Police later located Troy Severance, 36, of Litchfield at a Winthrop motel, where he was arrested in the robbery. Madore was tracked down in Wales, where he was taken into custody.

Severance is awaiting a court appearance on charges of robbery and stealing drugs.

After pleading guilty to the robbery charges in Androscoggin County Superior Court on Thursday, Madore was ordered to abide by conditions of drug court while he awaits sentencing.