A Pennsylvania police chief and his friend were arrested for allegedly sexual abusing a young girl over the course of at least seven years, according to the state's attorney general.

Weissport Chief of Police Brent Getz, 27, and Gregory Wagner, 28, allegedly raped a girl from the time she was 4 until she was 11 years old, Pennsylvania Attorney General Josh Shapiro said in a press release Wednesday.

Getz and Wagner were charged Tuesday with rape of a child, aggravated indecent assault of a child and other related charges.

Police investigated the case multiple times since 2012 and pressed charges this week after a police search on Wagner's home.

"The defendants terrorized this young victim by assaulting her hundreds of times over seven years,” Shapiro said. “My Office will listen to survivors and prosecute anyone who sexually abuses children to the fullest extent of the law we are able — no matter how much time has passed."

The girl, as a minor and alleged victim of sexual assault, was not identified.

Authorities initially began investigating in 2012 after the girl, then 12 years old, told a substitute teacher that Wagner sexually assaulted her. The teacher then reported Wagner to the Franklin Township Police Department.

Wagner initially denied the allegations in 2012 and no charges were filed. Police reassigned the case in 2015, but a judge dismissed the criminal complaint due to a paperwork error.

The girl told authorities in 2012 that she was orally, vaginally, and anally raped by Wagner several times a week, according to a criminal complaint. She also claimed that Wagner, a relative, made her watch pornography depicting teenagers, the complaint said.

A nurse who examined the girl said that many of her symptoms, including a history of urinary tract infections, were consistent with sexual abuse.

The police in Franklin revisited the case and asked the victim to come back in for an interview in 2018. She then said that Wagner's friend Getz had also participated in the assaults.

During a search of Wagner's home on Tuesday, police located numerous electronic devices which contained Google searches of terms indicative of child pornography.

Wagner confessed to having sexual intercourse with the girl on at least three occasions when interviewed by police Tuesday, according to the criminal complaint. He also told police that Getz had sexual contact with the girl while Wagner played video games in the same room.

The case was referred to the state's attorney general because Getz was a police officer employed or formerly employed at several police departments in Carbon County.

It was not immediately clear whether the men have attorneys.