CASPER, Wyo. (AP) — A judge has sentenced a former Wyoming sheriff's deputy to probation for trying to sell a prescription painkiller.

A jury found Michael Martinez guilty last summer of attempting to deliver oxycodone. Prosecutors say Martinez agreed to sell the painkiller to a confidential informant.

Martinez was a corrections officer at the Converse County jail at the time.

Natrona County District Judge Daniel Forgey sentenced Martinez on Wednesday to two to four years in prison, with time suspended if Martinez completes two years of supervised probation. Forgey fined Martinez $2,000.

The Casper Star-Tribune reports (http://bit.ly/2yRrKRe) Martinez declined when offered the opportunity to speak in court on his own behalf.

Martinez's attorney says Martinez accepted responsibility for his actions, which he described as an isolated crime of opportunity.

___

Information from: Casper (Wyo.) Star-Tribune, http://www.trib.com