A former Hillsborough Police Corporal has received a sentence of 20-to-33 months, with active jail time suspended, for two counts of indecent liberties with a minor.

James Riley Jr. pleaded guilty on March 23, in Orange County Superior Court, according to court records.

Riley began working with the Hillsborough Police Department as an officer in January 2004, according to the department. He was dismissed from his position on July 23, 2013, three days after the town placed him on administrative leave following an internal investigation.

After receiving a complaint of potential misconduct by an off-duty officer, the department opened an investigation into Riley. The town contacted state authorities after their investigation found potential criminal misconduct.

The Orange County District Attorney’s Office filed charges against Riley in April of last year.

Riley’s use of his position as an officer, even while working off duty, was cited as an aggravating circumstance by the court in determining his sentence. He is on probation, was placed on the N.C. sex offender registry and was ordered to perform community service.