Spanish police have arrested a minor on suspicion of killing a teacher and wounding four others in an attack believed to involve a crossbow at a high school in Barcelona.

The alleged attacker was aged under 14, a police spokesman said, but he could not confirm that he was a pupil at the school.

Police said it appeared the perpetrator used a crossbow. Firearms were ruled out.

A student from the school said she had seen the attacker wield a knife.

"The boy came into our class with a knife and wanted to attack a friend of mine," the student told Reuters.

"But he didn't manage to, he left, and we had a chance to run away."

The teacher killed was a male. Two teachers and two students were also wounded in the attack, which took place after classes had started, police said.

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.

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.

Reuters