A masked man brandishing a sword stabbed four people at a school in southern Sweden, killing one teacher and a student before being shot by police.
Authorities said another teacher was wounded and two students, aged 11 and 15, were seriously injured with cuts. One of the boys died later in hospital, as did the attacker.
The Dagens Nyheter newspaper has pictures of the suspect wearing what appears to be a Star Wars Darth Vader mask, posing with students just before the attack.
Police said the attack took place in the cafe area of the Kronan school in Trollhattan, near Goteborg, Sweden's second-largest city.
The attacker - aged 21 - underwent emergency surgery after he was shot by a police marksman.
Officers arrived to find one male teacher already dead and two students and another male teacher wounded, police spokesman Thomas Fuxborg told The Associated Press. Fuxborg said police fired two shots at the attacker, one of which hit him.
The attacker had a large knife, possibly two, including what may have been a sword, another police spokesman, Stefan Gustavsson, told the AP. He said authorities knew the attacker had killed the teacher "because of the wounds he had."
Laith Alazze, a 14 year-old student at the school, said at first he thought the attacker - who was clad in black with a mask - had something to do with Halloween.
"One of my friends walked over to him to challenge him, but when we saw he stabbed him (the teacher), we ran away," Alazze told Sweden's TV4.
Dr Lars Spetz of Norra Alvsborgs Lanssjukhus hospital which treated the casualties, told reporters the wounded teacher had been stabbed in the abdomen while the two students were stabbed in the abdomen, liver and chest.
The attacker, who was also at the hospital, had gun wounds to his lower chest, he said.
The school has 400 students, ranging from pre-school to high school.
Swedish media say the school held a meeting Thursday morning to discuss teachers' worries that the school was too open, with a cafe for adults that meant the school could not control who comes in.
Swedish Prime Minister Stefan Lofven, who headed to Trollhattan, described Thursday as a "black day."
"My thoughts go out to the victims and their families, the students and staff, and the whole community that has been affected," Lofven said. "No words can describe what they are going through right now."