A student at a Massachusetts middle school was arrested after allegedly attacking a teacher with a screwdriver during class Wednesday, authorities said.

The unnamed 11-year-old student at the William R. Peck School in Holyoke was charged Friday with assault and battery by a dangerous weapon and suspended from school, The Boston Globe reported.

While the tool grazed the teacher’s neck, it wasn’t a significant injury, Holyoke police said. The teacher was treated at the scene by the school nurse.

“The screwdriver did not puncture, but it was certainly an attack,” Lt. James Albert told The Globe. He said that the teacher “got lucky.”

The student ran away after the attack and sent the school into a brief lockdown, WCVB-TV reported. The student was later located and arrested.

Police believed the student brought the screwdriver with him to class, but investigators were still working with the school to determine the motive behind the attack.

While no students were hurt in the attack, the school district said the incident may have been “upsetting” to those who saw or heard about it and would make counseling services available to students, MassLive reported.

“We are working with the Holyoke Police Department to follow up on this incident, and we want to assure you that safety continues to be our greatest priority,” the school district said in a statement.

The Associated Press contributed to this report