A masked man brandishing a sword has killed a teacher and a student and seriously wounded two other people at a school in Sweden Thursday before being shot and killed.
Pictures taken by students and circulating in the media showed the assailant wearing black clothes and a Darth Vader-like mask, with school children initially thinking it was a prank or a Halloween costume.
The attacker, who went from classroom to classroom, struck at a school for six to 15-year-olds in the southwestern town of Trollhattan on Thursday morning, shocking a nation where such violence is rare.
One teacher was found dead at the school - described in the media as a "problem school" - while a second victim and the assailant died in hospital several hours later.
Police investigator Thord Haraldsson confirmed the second victim was a young male student.
"The assailant knocked on two classroom doors and he attacked the two students who opened the doors," he said.
Hospital staff had previously confirmed that two boys, aged 11 and 15, were in critical condition with stab wounds, while another teacher who was seriously wounded in the attack was also undergoing surgery.
The assailant was a 21-year-old man from Trollhattan who was shot by police at the scene and later died from his wounds in hospital.
Police have already identified the attacker, however they have not disclosed any further information about him and the motive for the attack remains unclear.
"When we first saw him, we thought it was a joke. He was wearing a mask and black clothes and (carrying) a long sword. Some students wanted to take their picture with him and feel the sword," one student identified only as Laith told Swedish television SVT.
When the man started attacking people, he quickly realised it wasn't a joke and fled as the assailant went from classroom to classroom looking for victims.
Another student, 14-year-old David Issa, told AFP he was sitting in the school's cafe when he saw the attacker approach.
"We were sitting in the (school's) cafe and then this guy came up who was wearing a mask and carrying a sword and he stabbed my teacher. I panicked and ran away," he said.
"Then the police came. And he started stabbing others in the classrooms, banging on the classrooms and stabbing people in there," he said.
Police said several knives were used in the attack.
They said there was "a lot of confusion" at the school, and pupils and teachers remained inside the building several hours after the attack.
According to its website, the Kronan school has around 400 pupils, including many newly-arrived immigrants.
Swedish media described it as a "problem school".
It had been criticised by the Swedish Schools Inspectorate for its lax security and on account of a number of disruptions which prevented the pupils from learning.
Teachers had complained to the inspectorate about the school library and cafe being open to the public and creating an insecure environment for the children, Swedish news agency TT reported.
Take your Radio, Podcasts and Music with you