A high school teacher in Northern California accidentally fired a gun inside a classroom Tuesday afternoon and injured at least one student.

The Mercury News reported that Dennis Alexander, a reserve police officer for Sand City, had been providing safety instructions at Seaside High School when he accidentally fired a single shot from a semi-automatic handgun into the ceiling, police said.

A student was hit in the neck by debris after the bullet ricocheted off the ceiling, but was not seriously injured, police said.

The incident was brought under control and classes resumed, but an investigation is ongoing, the Monterey County Herald reported.