A Rock Springs man who once studied political science at the University of Wyoming admitted to robbing the Laramie K-Mart pharmacy Monday in Albany County District Court.

Michael Luke Yerkovich, 27, pleaded guilty to one count of robbery as part of a plea deal with the prosecution. The charge carries a maximum sentence of up to 10 years in prison and a $10,000 fine, but per the plea bargain, prosecutor Kurt Britzius will recommend no more than a year of jail time and probation at the sentencing hearing.

Yerkovich admitted to pacing the Laramie K-Mart for between 45 minutes and an hour on Feb. 15, 2013 before taking a toy pistol from its display shelf, putting it in his coat pocket and representing it as a real weapon when he approached the pharmacy counter in a black ski mask and demanded painkillers from the clerk.

Court documents say Yerkovich fled on foot with 11 bottles of prescription painkillers containing 767 pills.

Police had no luck finding Yerkovich until a confidential source called Crimestoppers in October and named Yerkovich as the suspect. According to a police affidavit, the source also said Yerkovich had a serious addiction to heroin and other opioids.

Authorities found Yerkovich at the Wyoming Behavioral Institute in Casper. According to defense attorney Jason Tangeman, it was the third time Yerkovich checked himself in at the facility to deal with mental health issues.

Yerkovich reportedly identified himself as the man in the ski mask robbing the K-Mart pharmacy captured on security footage.

Yerkovich remains free on bond. He said in court Monday he lives with his father in Rock Springs, where he works two jobs.

A sentencing date will be set pending completion of the presentence investigation.