A York County man pleaded guilty on Monday to secretly hideously filming girls changing and showering in a bathroom at his home using a hidden camera.

Lake Wylie resident Mark Steven Ehrnschwender, 64, has been sentenced to 20 years behind bars after pleading guilty to single counts of second and third-degree sexual exploitation of minors, and four counts of misdemeanor voyeurism, the Herald Online reported.

Court documents showed that the York County Sheriff’s Office was informed that Ehrnschwender shared a video via the filesharing Bit Torrent platform in October 2018.

The attorney general’s office spokesman Robert Kittle said that Ehrnschwender also was found in possession of more than 500,000 child pornography and exploitation pictures and almost 9,000 abuse videos. Investigators also revealed that Ehrnschwender recorded more than 7,500 voyeuristic videos.

Kittle added that upon reviewing his seized devices, officials discovered that the suspect had secretly recorded videos of his friends and family members in his bathroom, WCNC noted.

Court documents showed that videos include naked and partially naked individuals taking showers, changing their clothes, and using the bathroom.

Nineteen victims, including minors, were identified.

However, the video the sex offender shared online via Bit Torrent, which led to his arrest, was not the materials he recorded in his house.

Gary Lemel, the defendant’s lawyer, expressed his apologies on behalf of his client’s heinous crime.

“My client took full responsibility for his actions and hopes that his family and the victims will see his remorse for the pain he has caused them,” Lemel said in a statement.

Some of the victims, who were unnamed due to their ages, were present in court Monday.

The accused was obliged to register as a sex offender for the rest of his life after his release from the South Carolina Department of Corrections.

In South Carolina, the law describes child pornography as “sexual exploitation.” Second-degree sexual exploitation of their law is the sharing of child pornography, while third-degree sexual exploitation is the possession of child pornography.

Erschwender pleaded guilty to possession and sharing of child porn.

York County Circuit Court Judge Dan Hall sentenced Ehrnschwender after he vowed to an agreement with prosecutors with the S.C. Attorney General’s Office Internet Crimes Against Children task force.

bathroom-691341_1920 A Lake Wylie man faces 20 years behind bars for hideously taking videos of friends and relatives while they took showers and changed clothes at the bathroom in his home. Moreover, police discovered he obtained thousands of child porn pictures and videos. This is a representational image. Pixabay