Barcelona, Spain: A Spanish student reportedly armed with a crossbow and a knife killed a teacher and wounded four others at a school in Barcelona, police and witnesses said Monday.

The unidentified boy, who local media say was 13, was detained by police as a suspect after the attack that also saw two other teachers and two students injured.

The deadly incident, which took place just after 9.30am, sowed terror in the high school in a working class neighbourhood of Spain’s second largest city. School attacks are extremely rare in Spain.

“We were just starting the class and suddenly we heard screams,” said student Gemma Jarque. “So we shut ourselves inside our classroom in order to be safe.”

A regional police spokeswoman said the teacher killed was attacked with a weapon that had a blade, but would not say what exactly was used.

She spoke on condition of anonymity because of police regulations that prevented her from being identified by name.

Spanish National Television and other Spanish media reported that the boy had a knife and a crossbow when he entered the school.

Authorities did not disclose details of how the attack played out, but Jarque said she and others hid in her classroom after hearing the screams and left along with other students only after a fire alarm sounded.

“We saw the teacher, lying on the floor in a pool of blood,” she said.

Another student, Paula Amayuelas, said she knew the suspect and that he “didn’t have problems but he was kind of a loner. Other students would pick on him.”

The two wounded students and one of the injured teachers were taken to Barcelona hospitals for treatment while the other injured teacher was treated at the scene and did not need hospitalisation.

After the attack, parents and students gathered in stunned silence outside the school for students ages 12-16, hugging each other. Students said the teacher killed was a substitute working at the school for about a week.

A spokesman for regional police said it was too early to determine whether the attack was an attempt to copycat the April 20, 1999 attack in Columbine, Colorado killed 12 students and one teacher.

Police in Barcelona did not identify the suspect because of his age.

In Spain, children under age 14 are not held legally responsible for crimes and cannot be jailed or placed in juvenile detention centers.

They can be sent to mental health institutions, said a spokesman for Spain’s Justice Ministry who spoke on condition of anonymity because of ministry policy.

A national police spokesman could not recall any fatal school attacks in the country’s recent history.