Sweden in shock over deadly school attack
Investigator Thord Haraldsson said a racist motive was "part of the picture" but did not reveal further details.
Two others were critically injured in the attack at the school in Trollhattan on Thursday morning.
The attacker, 21, was seen posing for a photograph with students, who thought he was dressed for Halloween, before going on the rampage from classroom to classroom, sending panicked students fleeing from the school building.
`Black day`
A teacher and 17-year-old boy died from stab wounds, while another male student, 15, and 41-year-old teacher remain in serious condition in hospital.
The attacker`s name has not yet been released by police, though they say he was local to Trollhattan.
Before visiting the scene of the attack, the Swedish prime minister said it was a "black day" for Sweden.