Young Pupil
[Representative Image] Young pupils wait in the courtyard at the Abbe de l'Epee elementary school on September 3, 2013 in Marseille, southern France, prior to enter her classroom on the first day of school.ANNE-CHRISTINE POUJOULAT/AFP/Getty Images

A seventh-grade student at Wendover Middle School in Pennsylvania, the US, walked up in an empty classroom in the middle of the night on Wednesday, raising security concerns. The student, who said he was sleepwalking, entered the school at 2:30 am local time.

State police revealed that the student called the 911 emergency number in the middle of the night and said that he woke up inside the school, Associated Press reported. Police said that the student, who lived about 4 miles away from the school, entered the building through a window.

"It appears he went through a screen in the window and got himself in the school. He was in the school for about 15 minutes," Pennsylvania State Trooper Stephan told KDKA. "He believes he was sleepwalking and went to the school."

Following the incident, classes at the Wendover Middle School were canceled. The Hempfield Area School District in a statement on the official page said that the school was closed as a precautionary measure.

"A seventh grade Wendover Middle School student was found in the school during the early hours of February 21st. The student entered the building overnight and there is no evidence of vandalism or theft at this point. The PA State Police have cleared the school; however, due to the timing of discovery, the school was closed as a precautionary measure," the statement read.

The district also clarified that Wednesday's situation was not related to an earlier incident that involved the arrest of a student for threating to shoot a female student.

"The student involved in this situation was not connected to yesterdays' reported threat. There is no connection between the reported threat of February 20th and the student break-in during the early morning of February 21, 2018," the district said.