(STMW) — A 10-year veteran northwest suburban sheriff’s deputy who once served on a child pornography task force will spend the next 50 years in federal prison for sexually abusing a child and distributing images of the attack online.

Gregory Pyle, 38, of Crest Hill, pleaded guilty on Jan. 3 to crossing a state line with intent to engage in a sexual act with a child under 12, according to a statement from the U.S. Attorney’s office.

On Wednesday in Rockford, U.S. District Court Judge Frederick Kapala sentenced the former McHenry County Sheriff’s deputy to 50 years in prison, and lifetime supervision if he is ever released.

Pyle admitted that on Dec. 13, 2008, he had custody of a child when he drove from Crystal Lake to Milwaukee with the intention of engaging in sexual acts with the child and “producing visual depictions” of the acts, federal prosecutors said.

He stayed overnight in a Milwaukee hotel with the child and engaged in sexual acts that were “sadistic, masochistic, and violent,” prosecutors said. He then produced images of the acts and distributed them over the Internet.

Pyle—a former sergeant with the sheriff’s office—had surrendered in 2013 following a joint investigation by Illinois State Police and McHenry County officials into sexual assault allegations.

He had been a member of the Illinois chapter of the Internet Crimes against Children Task Force—a program with the U.S. Department of Justice and the Center for Missing and Exploited Children.

Pyle’s sentencing will be completed on Oct. 21, when the judge will impose restitution and special conditions of any supervised release.

“For over five years, [Pyle] was entrusted with the efforts of the McHenry County sheriff’s office to protect children from exploitation and abuse,” assistant U.S. atty. Michael Love said in the statement. “When he knew he was under investigation, he successfully obstructed investigators determining the full scope of his criminal conduct.”

(Source: Sun-Times Media Wire © Chicago Sun-Times 2014. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)