What was thought to be a prank eventually became a safety concern promoting an elementary school in Pennsylvania to shutdown.

Officials at the Neil Armstrong Elementary School in Scranton, Penn., were confused Thursday morning when they found that soap had been spilled through the building. Staff originally thought it may have been a prank but when the school principal reviewed security footage, he became concerned.

PHILADELPHIA POLICE DETECTIVE SHOOTS PANHANDLER HE THOUGHT WAS A ROBBER

An unidentified man was seen entering the school, taking off his clothes and spilling Murphy’s Oil Soap on the gym floor and other parts of the building, WNEP reported.

Scranton Police Chief Carl Graziano confirmed that the suspect had undressed and had walked “through at least a portion of the school without any clothes on.”

He said that school officials also decided to shut down for the day at around 7 a.m., resulting in a day off for the more than 600 students.

CLICK HERE TO GET THE FOX NEWS APP

"We're dealing with children, better to be safe than sorry," he continued.

Police said there was no forced entry. WNEP reported Friday morning that police have arrested the suspect but would not release his identity pending a mental health evaluation.

The Associated Press contributed to this report.