A Pennsylvania middle school canceled classes after a student who said he was sleepwalking was found inside the building.

State police say the seventh-grade student called 911 around 2:30 a.m. Wednesday to report he was inside Wendover Middle School in Hempfield Township.

The student told authorities he had been sleepwalking and woke up inside the school. Police say the student entered the school through a window and wandered around for about 15 minutes.

Police say the student lives about 4 miles from the school.

The Hempfield Area School District canceled classes Wednesday due to security concerns, and police swept the building. The district says Wednesday's incident is not connected to another student's arrest earlier this week for threatening to

shoot a female student.

Classes were scheduled to resume Thursday.