A Dallas-area man was sentenced to 60 years in prison after he pleaded guilty to filming himself raping a 7-year-old girl, authorities said Friday.

Mark Allen Miller, of Rowlett, was sentenced Thursday by a federal judge in Dallas after pleading guilty to two counts of producing child pornography, the U.S. attorney’s office for the northern district of Texas said in a statement.

Miller, 35, was arrested on Jan. 12 after the girl’s father, with whom Miller was staying, said he walked in on Miller raping the girl, who was 9 years old at the time. Miller admitted to police that he had been molesting the girl for years, the prosecution statement said.

The father told investigators that he and Miller had been friends for more than a decade and that Miller was staying overnight at their home. The father heard a noise and went to check on it. When he saw that Miller wasn’t in the living room where he’d been sleeping, the father rushed to his daughter’s room and found Miller raping her. The father held Miller at gunpoint until police arrived.

LAPD ARRESTS 2, SEIZES CACHE OF ILLEGAL MATERIAL USED TO MAKE GHOST GUNS

Prison bars

A Dallas-area man was sentenced to 60 years in prison after he pleaded guilty to filming himself raping a 7-year-old girl, authorities said.

A forensic analysis of Miller’s electronic devices revealed that he had produced at least five videos and 132 images of child pornography involving the victim dating back two years to when she was 7.

CLICK HERE TO GET THE FOX NEWS APP 

During the sentencing hearing, a Rockwall Police Department forensic analyst testified that Miller’s electronic devices contained more than 8,000 sexually explicit images of other children.