ROCKFORD, Ill. (AP) — A former northern Illinois sheriff's deputy who investigated child pornography was sentenced Wednesday to 50 years in federal prison on charges involving sex with a minor.

Gregory Pyle, 39, of Crest Hill pleaded guilty last December, admitting that he brought a boy over state lines to engage in sex acts and made child pornography with the boy, The Northwest Herald reported.

Prosecutors sought the half-century sentence. Pyle had faced a 30-year minimum sentence and up to life in prison.

Pyle is a former McHenry County sheriff's deputy who prosecutors say once led that department's child pornography investigations.

He admitted in court documents that he took a 9-year-old boy from suburban Chicago to Milwaukee in 2008, sexually abused him and posted the photos online.

He'd been with the sheriff's department for 10 years when he was charged in 2012.

Pyle also has 10 pending counts of predatory sexual assault of a child in McHenry County. He was arrested on those charges in January 2012 and posted bond but was re-arrested the following August on the federal indictment.

Copyright 2014 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.

More From WROK 1440 AM / 96.1 FM