A Spanish schoolboy armed with a crossbow and a knife killed a teacher and wounded four other people in an attack at a Barcelona high school today, police said.

The boy was detained after the assault at the Joan Fuster school in the north of the city and police said he was aged under 14. Spanish media said he was 13.

Witnesses said the youngster, who has not been named, entered the school in the morning. He is believed to have killed the teacher with a knife, but also had a crossbow with him.

"He was carrying one but it's not what (he) used to attack the teacher," a police spokeswoman said.

A student from the school said she had been in a classroom when the attacker walked in.

"The boy came into our class with a knife and wanted to attack a friend of mine. But he didn't manage to, he left, and we had a chance to run away," the girl told Reuters TV.

Two teachers and two students were wounded in the assault. None of their injuries were serious.

Such attacks are a rarity in Spain. The incident occurred on the anniversary of the 1999 Columbine school killing in Colorado in the United States in which 12 students died.

The Joan Fuster school suspended classes until Wednesday, head teacher Maria Dolors Parramon told Spanish television. She said students were being offered psychological support.

Under Spanish law, minors under the age of 14 cannot be formally arrested or criminally tried. They are only held in specialised centres in exceptional cases.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.