"It was crazy," said one of the students with his parents next to him.
San Jose police confirmed multiple students in the locker room saw him with a phone.
MORE: Student arrested after loaded firearm seized at San Jose middle school, police say
"The suspect did have a mobile device and was recording inside of the locker room," said Tanya Hernandez, SJPD Public Information Officer.
One parent whose daughter was in the PE class in question said students saw the PE teacher acknowledge the suspect.
"Supposedly the PE teacher saw the person and supposedly said hi to him. Students saw him walk by," said Evan, a Bret Harte Middle School parent.
Minutes later, several students reported the stranger to school staff.
"He was in the bathroom for a while, and he was taking pictures. It's concerning that anybody can just walk onto campus like that. No one said anything," said Evan.
According to SJPD, when school staff confronted the suspect he fled. Police found and arrested him two days later, yet parents are still questioning how did this happen?
"He walked right by and supposedly when they told him that he had to leave he flicked them off and cursed at them and nobody really engaged in trying to remove him from the school," said Evan and added, "We are looking for some answers."
INTERACTIVE: Take a look at the ABC7 Neighborhood Safety Tracker
Police found the suspect in San Jose with photos on his phone.
"The suspect was booked into the Santa Clara main jail for possession of child sexual abuse material as well as using a camera to record inside of a private area," said Hernandez.
We contacted the school district and have not heard back. According to parents, there will be a special meeting to speak about the incident.
"Very upset. Very upset," said Charlie Hernandez, a Bert Harte Middle School parent and added, "We kind of question the safety now. It's kind of buckled me. It's a reality check."