Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A 14-year-old boy held students at a West Virginia high school hostage with a pistol on Tuesday before releasing his captives and surrendering, state police said.

No one was hurt in the incident, which began at around 1:30 p.m. at Philip Barbour High School, about 30 miles southeast of Clarksburg, state police said.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The teen student held 27 other students and a teacher in a second-floor classroom but released them after authorities began negotiations, state police said.

The boy, who was not identified by officials, put down the loaded .380-caliber handgun and surrendered to authorities by around 3:30 p.m., West Virginia State Police Lt. Michael Baylous said. The boy was being evaluated at a local hospital Tuesday evening, police said.

Baylous thanked parents of students for keeping their composure during the frightening ordeal.

"Their ability to keep calm in this situation made it much easier for officers to successfully perform their duties, which resulted in positive conclusion to an incident which easily could have developed into a tragedy," Baylous said.

The rest of the school was evacuated and students were sent home in buses. Baylous said the school had an evacuation plan in place, which worked as designed.

Police officers who negotiated with the teen have some idea as to a motive, but the case is still under investigation, Baylous said.