WOODSTOCK – A once well-regarded Sheriff's sergeant admitted to sex crimes with a young boy, bringing to an end a crime prosecutors called "despicable," and one that left a black mark on the McHenry County Sheriff's Office.

Gregory M. Pyle, formerly of Crystal Lake, was sentenced Friday to 45 years in prison on a state charge of predatory criminal sexual assault of child. That sentence will run concurrent to a 50-year federal prison term he received in September.

Pyle, 39, at one time headed the Office's Internet Crimes Against Children task force. It's there that authorities and Pyle's former wife believe he picked up to the tools to sexually assault the child for a number of years without getting caught.

He used heavy encryption to protect his computers, and shielded his face in pornographic images involving the child, federal prosecutors said. Before being arrested on federal charges, Pyle attempted to destroy his computer by dumping it in a frozen lake.

Shackled at his hands and feet and clutching a small Bible, Pyle did not make eye contact with the six Sheriff's deputies who watched Friday's court proceeding. His guilty plea was accepted by McHenry County Judge Gordon Graham.

Assistant State's Attorney Michael Combs said Pyle's crimes were "despicable and outrageous."

"He let down an entire department," Combs said after court. "I hope people don't think this reflects in anyway way on the office of the McHenry County Sheriff. … The actions of one coward should not reflect on the entire office."

Pyle posted bond shortly after being arrested in January 2012 on 10 sex charges – nine of which were dropped in exchange for his guilty plea. He later was indicted on federal charges for bringing the victim over state lines to make and distribute child pornography.

After his local court costs are paid, the remainder of the $20,000 bond he posted will be returnable to his defense attorney Jim Ryan.

"Obviously he's remorseful," Ryan said outside of court. "And he has taken responsibility for his conduct."

Pyle was brought from Stephenson Correctional Facility on Friday where he's been housed on federal charges. He soon will be transferred to Metropolitan Correctional Center in Chicago for processing and will serve his sentence in the federal prison system, though it's unclear where.