A man was arrested Wednesday after he was caught secretly videotaping two women in the bathroom of the Barnes & Noble in Clifton, authorities said Friday.

Juan Mejia, 44, of Paterson, was charged with two counts of invasion of privacy and two counts of endangering the welfare of children after videos of suspected child pornography were found in his home after he was arrested, the Passaic County Prosecutor’s Office and Clifton Police announced Friday.

The mother of one of the victims said in a Facebook post that her daughter texted her from the stall of the bathroom and said she saw a man standing on the toilet next to her filming her with a GoPro camera.

The mother alerted store employees and together they went to the bathroom and one of the female employees started banging on the door of the stall next to one the daughter was using.

“Finally the door opened and the person stepped into view...my heart sank as I saw a middle aged....man exit the stall.. I started to cry," the mother wrote.

The Passaic County Prosecutor’s Office did not respond to an email seeking further details about the incident on Friday afternoon.

Barnes & Noble issued a statement saying that they were “disturbed” to learn about the incident that happened at the bookstore located in the Clifton Commons shopping center on Route 3.

“When store employees were alerted to the situation, they immediately notified the police, and the suspect was apprehended,” the company said in a statement. "We thank the police for their quick work, and we will continue to cooperate fully as they investigate. We take security very seriously and are as vigilant as possible in making our stores safe and inviting for customers.”

Mejia was being held in Passaic County Jail and his pretrial detention hearing was scheduled for Feb. 26 in Passaic County Superior Court, the office said.

Anyone with additional information about the incident was asked to prosecutor’s office tips line at 1-877-370-PCPO or tips@passaiccountynj.org or contact the Clifton Police Department at 973-470- 5900.

Chris Sheldon may be reached at csheldon@njadvancemedia.com. Follow him on Twitter @chrisrsheldon Find NJ.com on Facebook.

Have a tip? Tell us. nj.com/tips. Get the latest updates right in your inbox. Subscribe to NJ.com’s newsletters.