He was a up-and-coming high school rowing team coach who already had a record of success.

The women’s varsity crew that Timothy Warren Vallier coached in Rockford, Mich., recently placed No. 8 in the country, according to ABC affiliate WZZM.

But while he was developing a reputation as a talented coach, investigators say the 30-year-old educator was hiding a nefarious secret.

For the past four years, police maintain, Vallier used hidden cameras to covertly record about 100 videos of his female athletes through a peephole he’d drilled in the teenagers’ changing room.

“Numerous underage victims were secretly recorded,” Timothy Kruithoff, a special agent with the U.S. Department of Homeland Security in Grand Rapids, wrote in a criminal complaint filed in federal court and cited by Mlive.com. “In most of the videos, the girls were changing into or out of athletic clothing, getting completely undressed and exposing their pubic area unknowingly to the camera.”

The complaint states that time stamps on the videos reveal that they were recorded in two separate changing rooms from 2012 to 2016. The videos — which police recovered on Vallier’s computer — were organized in files labeled with the first names of at least 15 different girls, the complaint states.

Police allege that Vallier had created a separate file that he labeled “to be sorted,” according to the complaint cited by WZZM.

Investigators also found child pornography on the coach’s computer, including images of girls as young as 13, the station reported. In addition to the lewd images, police allege the computer contained online keyword searches related to the photos, such as  “teen schoolgirl nude,’’ “barely legal teen sex’’ and “young teen rough sex,’’ the station reported.

Vallier was arrested July 8 following an investigation by the Kent County Sheriff’s Department and the Michigan State Police Internet Crimes Against Children Task Force, according to the Cedar Spring Post.

According to the Cedar Spring paper, he faces two federal charges: attempted production of child pornography and possession of child pornography. If convicted, WZZM reported, Vallier faces between 15 and 30 years in federal prison for the attempted production of child pornography. Possession of child pornography carries a maximum sentence of 20 years in federal prison.

“A federal conviction also carries a requirement for sex offender registration, a potential fine of up to $250,000 and financial compensation to the victims,” the station noted, as well as “a lifetime of supervised release” once he’s out of prison.

“I’m more than shocked; it’s horrific,” Rockford Public Schools Superintendent Michael S. Shibler told WZZM. “I’m so sorry for the parents and the students having to deal with this. And I’m angered and frustrated.”

The videos were discovered after two former rowers working as coaches discovered a video camera in an SUV outside the rowing facility, WZZM reported, citing the criminal complaint. Knowing that Vallier sometimes taped competitions and practices, they turned the camera on and discovered illicit videos of rowers dressing in the changing room, the complaint states.

“They saw a black circle around the edge of the recording which appeared as if the video had been shot through a peephole in the wall,” Kruithoff wrote, according to WZZM. “They notified the school, which notified police.”

When investigators arrived at the athletic facility, they found a hidden compartment in the team changing room wall with two small holes drilled into it, the complaint states.

Vallier told investigators one hole was already there, but he added a second one that he widened using a file so he could obtain a “better view,” Kruithoff wrote.

“He stated that he placed a towel and a piece of cardboard inside the wall to position the camera against the holes,’’ he added.

Shibler told Mlive.com that Vallier was a seasonal coach and noted that he will not be allowed back on school property. He said counseling services have been made available for students who need them.

The superintendent told WZZM that school officials are looking for ways to detect hidden cameras in the future.

“If that technology exists, we want to use it,’’ he said.