Minor detained after Barcelona school killing
The alleged attacker was aged under 14, a police spokesman said, though he could not confirm he was a pupil at the school.
Police said he had a bladed weapon that could have been a crossbow, though this had not been confirmed.
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. But he didn't manage to, he left, and we had a chance to run away," the student, a minor, told Reuters TV.
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.
(Reporting by Raquel Castillo and Reuters TV,; Writing by Sarah White; Editing by Ralph Boulton)