A teacher at P.S. 174 in Rego Park spotted a man filming her through a window as she used a school bathroom, police said. View Full Caption DNAinfo/Ben Fractenberg

QUEENS — A teacher at a Rego Park elementary school spotted a peeping Tom filming her through a window as she used a school bathroom, police said Thursday.

The 43-year-old victim was using the restroom at P.S. 174 William Sidney Mount during school hours, around 1:30 p.m. on Friday, when she saw the man who appeared to be filming her with a cellphone, police said.

The bathroom located in the basement was for students only and it was not immediately clear why the teacher was using it, sources said.

The victim, who described the man as being between 40 and 50 years old, told investigators she had never seen him before.

The man ran away once the teacher spotted him, officials said.

“The safety and security of students and staff is our top priority,” Miranda Barbot, a spokeswoman for the Department of Education, said in a statement.

"The NYPD responded to and is investigating an incident that took place at 28Q174 last week," she added. “The school community has been notified and we’re working with the school to address it.”

No arrests have been made as of Thursday, police said.