MINNEAPOLIS (WCCO) — A Itasca County Sheriff’s Office deputy was charged Wednesday for allegedly recording video of a 17-year-old girl undressing in a bathroom on a county-issued smartphone.

READ MORE: Good Question: How Do Trees Know When To Bloom?

Aaron Edward Apitz, 46, of Deer River, was charged with felony interference with the privacy of a minor under 18.

According to the Minnesota Bureau of Criminal Apprehension, on Feb. 25 the victim saw an iPhone hidden under the vanity in the bathroom where she undressed to shower. She noticed that the smartphone had been recording video and audio.

READ MORE: Minnesota Companies Mining Gold From Nostalgia For Decades Gone By

She stopped the video, replayed it and saw Apitz positioning it so that it would be pointed to her as she got ready to shower.

The complaint states that the phone’s memory had been completely wiped clean and all data had been deleted by the time the BCA confiscated it.

According to the Grand Rapids Herald-Review, Apitz resigned on Tuesday after working for the sheriff’s office for 17 years.

MORE NEWS: After Her Kids Were Hacked, Cybersecurity Engineer Writes Children's Book

The complaint states that Apitz apologized repeatedly to the victim and the victim’s family for his conduct.