A teenage student in Barcelona killed one teacher and injured three others with a crossbow and knife in an attack that has shocked Spain.

The middle school student arrived at school armed and attacked a teacher who reprimanded him. He is currently in custody.

A little after 9 a.m., a 13-year-old male student arrived at the Joan Fuster Institute and was reprimanded by his Spanish teacher, according to the BBC. The student, who has not been named because he is underage, shot the teacher with a homemade crossbow and then stabbed a 13-year-old female student. Upon hearing their screams, a substitute teacher entered the room and was shot as well. The assailant also stabbed the second teacher fatally. Another student was also injured.

The student fled the scene but was later apprehended, according to El Pais. He was carrying an air-soft rifle as well as materials to make Molotov cocktails. The Mossos d’Esquadra, Catalonia’s police force, took the student to a local hospital to undergo psychiatric evaluation. The wounded were treated at a local hospital but their wounds were not serious.

El Pais has identified the victim as 35-year-old Abel Martinez Oliva, who has been substituting as a social science teacher for almost two weeks.

Because in Spain children under the age of 14 cannot be tried for murder, the child will remain under psychiatric evaluation.

El Mundo reports a gym teacher apprehended the student, who was hiding within the school. Identified only as M.P.C., the child will go under the custody of the Catalonia’s Dirección General de Atención al Menor, which oversees children. This is the first time in recorded Spanish history a pupil has killed a teacher.

The EFE news agency reported the assailant had proclaimed in the days before that he wanted to injure teachers. He showed his classmates a “hit list” of 25 teachers at the school, but his friends brushed it off as a joke.

The mayor of Barcelona, Xavier Trias, expressed his condolences via Twitter.