A 40-year-old Louisiana man has been sentenced to 175 years in prison for sex crimes involving children and for child pornography after investigators found thousands of explicit images on his electronic devices and heard from at least one girl who said she was sexually abused.

David Allen Hammond Jr. of Pearl River was convicted Thursday on all 28 counts against him, and was sentenced Friday, St. Tammany Parish District Attorney Warren Montgomery said from his office in Covington.

Judge William Knight told Hammond, “I usually don’t take pleasure in sentencing people to jail. But guess what? Today I’m going to make an exception,” according to a news release from the district attorney’s office.

Hammond was sentenced for crimes including sexual battery of a victim under age 13, aggravated crime against nature and 19 counts of producing pornography involving juveniles. He also was convicted on five counts of possessing pornography involving juveniles under 13, one of distributing pornography involving juveniles, and obstruction of justice.

A sheriff’s deputy testified that a 14-year-old girl who escaped from Hammond’s home in September 2017 told him that Hammond had sexually abused her and made a video of that act, according to the statement.

Investigators found more than 6,000 photos and videos in multiple hard drives, tablets, smartphones, and camera equipment, which all contained child pornography of the girl, other children, and even toddlers, authorities said. His doors had deadbolts that needed a key to open from inside, and windows were covered to keep anyone from looking in or out, the statement said.

Hammond was arrested Sept. 29, 2017. Montgomery said jurors heard calls recorded while Hammond was in jail, telling his wife and sister to hide or destroy evidence on a hard drive he had hidden from police.

A grand jury indicted Hammond in November 2017 on charges including rape, 500 counts of producing pornography involving juveniles and 300 counts of pornography involving juveniles under age 13.

That was later superseded by a 28-count bill of information that did not include the rape charge, Montgomery said Friday in a telephone interview.

“After further reviewing the case in preparation for trial, we concluded we did not need to obtain a conviction on all of those charges in order for there to be an appropriate sentence.” Montgomery said. “So we reduced and simplified the charges, resulting in a more streamlined case and a more efficient use of limited judicial and prosecutorial resources.”

Although bills of information are often used when defendants plan to plead guilty, a jury heard Hammond’s case and convicted him after a five-day trial, prosecutors said.